Nick Coghlan a écrit :

Implementing __with__ instead would give the CM complete control over
whether or not to execute the block.

please note, however, that this is an important change in the semantics of the with statement. As things are today, barring exceptional circunstances, the body of the with statement *will* be executed immediately. This allows to forget about the with statement when first reading code, as it doesn't change the intent of the programmer. What Glyph is proposing is more akin to Ruby code blocks.

cheers,
Baptiste

_______________________________________________
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