[Python-ideas] Possible PEP 380 tweak (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 30 08:12:54 CEST 2010


Guido van Rossum wrote:

I thought the basics weren't even decided?

I'll be posting a new version soon that ought to pin things down more precisely, then we'll have something to talk about.

I truly wish it was easier to experiment with syntax -- it would be so much simpler if these PEPs could be accompanied by a library that people can just import to use the new syntax

Hmmm. Maybe if there were an option to use a parser and compiler written in pure Python? It wouldn't be fast, but it would be easier to hack experimental features into.

If there was a separate PEP specifying just returning a value from a generator and how to get at that value using g.close(), without yield-from, would those problems still exist?

I don't think it's necessary to move the value-returning part into another PEP, because it doesn't conflict with anything. But close() returning that value could easily be moved into another PEP that depended on PEP 380.

PEP 3152 would still depend on 380, not on the new PEP.

Would PEP 3152 make sense with PEP X but without (the rest of) PEP 380?

For PEP 3152 to not depend on PEP 380, it would have to duplicate almost all of PEP 380's content.

-- Greg



More information about the Python-ideas mailing list