Nick Coghlan wrote:
Semantics
---------
The code::

<statement> with:
   <suite>

translates to::

def unique_name():
    <suite>
    <statement>
unique_name()


Bleh. Not only was my proposed grammar change wrong, my suggested semantics are wrong, too.


Raise your hand if you can see the problem with applying the above semantics to the property descriptor example.

So I think the semantics will need to be more along the lines of "pollute the namespace but mangle the names so they're unique, and the programmer can *act* like the names are statement local".

This will be much nicer in terms of run-time performance, but getting the locals() builtin to behave sensibly may be a challenge.

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to