Eric Sumner wrote: > I realize that I made an assumption that may not be valid; > namely, that a new scope is generated by the 'with' statement.
The with statement uses the existing scope - its just a way of factoring out try/finally boilerplate code. No more, and, in fact, fractionally less (the 'less' being the fact that just like any other Python function, you only get to supply one value to be bound to a name in the invoking scope). Trying to link this with the function definition pipelining provided by decorators seems like a bit of a stretch. It certainly isn't a superset of the decorator functionality - if you want a statement that manipulates the namespace it contains, that's what class statements are for :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ 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