How do I do this? (eval() on the left hand side)
Nick Coghlan
ncoghlan at iinet.net.au
Thu Dec 9 03:31:00 EST 2004
Peter Hansen wrote:
> Nick Coghlan wrote:
>
>> Generally, altering the contents of the dicts returned by locals() and
>> globals() is unreliable at best.
>
>
> Nick, could you please comment on why you say this about globals()?
> I've never heard of any possibility of "unreliability" in updating
> globals() and, as far as I know, a large body of code exists which
> does in fact rely on this -- much of mine included. ;-)
As Steve pointed out, I was, well, flat out wrong. You're quite correct - it's
only locals() that can cause a problem.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-list
mailing list