Steven Bethard wrote:
> Of course, this is almost exactly what the class statement does under
> the covers.
That 'almost' you have there covers some pretty significant differences though.
> The important points in the code above are the ``MAKE_FUNCTION`` and
> ``CALL_FUNCTION`` from the class statement itself, and the
> ``LOAD_LOCALS`` and ``RETURN VALUE`` that were inserted at the end of
> the code for the class's body.
And for anyone tempted to take this parallel too far, the important
*difference* is the fact that this scope gets ignored for the purposes of
lexical scoping.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com