Caleb Hattingh wrote:
'>>> a              # The value of a is changed.
8
'>>>

The value of a is changed. . . *maybe*.

The Python language definition states explicitly that updates to the dictionary returned by locals() may not actually alter the local variables.

Generally, altering the contents of the dicts returned by locals() and globals() is unreliable at best.

Cheers,
Nick.

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

Reply via email to