Python compilers?
Konstantin Veretennicov
kveretennicov at yahoo.com
Thu May 20 06:30:27 EDT 2004
Carl Banks <imbosol at aerojockey.invalid> wrote in message news:<38Yqc.166$eO6.128 at fe2.columbus.rr.com>...
> > There's more like it, e.g. the existence of the
> > locals() dictionary and the ability to modify it.
>
> New feature? I didn't think modifying the dict returned by locals
> affected the variables.
>
Evidence of crime :)
Python 2.3.2
>>> x
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'x' is not defined
>>> locals()['x'] = 1
>>> x
1
Not to mention stack frame magic available via inspect.*...
- kv
More information about the Python-list
mailing list