On 5/5/05, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
> > Makes me wonder if we shouldn't just return to the __enter__() and
> > __exit__() names of PEP 310[1] where for a generator __enter__() is
> > just an alias for next().  We could even require Phillip J. Eby's
> > "blockgenerator" decorator to rename next() to __enter__(), and add
> > the appropriate __exit__() method.
> 
> You must be reading my mind or something. . .
> 
> Unless there is something in today's 80-odd messages to make it redundant, 
> look
> for a post entitled something like "Minimalist PEP 340 (aka PEP 310 redux)"

Yeah, I should have linked to that discussion [1].  I wonder if it
would be possible to update PEP 310 with your ideas, or perhaps start
a new PEP?  I'd like to see a competitor for PEP 340 that addresses
some of the issues that came up, e.g. that the block-statement doesn't
look like a loop, so break and continue might look like they break out
of an enclosing loop.  It might also be a good place to mirror Guido's
PEP 340 examples with PEP 310-style examples -- I know the first
attempts at writing some of them weren't as clean as the later
attempts, so it would be nice to have somewhere to look for the
"current version" of everything.

STeVe

[1]http://mail.python.org/pipermail/python-dev/2005-April/053039.html
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to