help me
Richard Blackwood
richardblackwood at cloudthunder.com
Sat Oct 9 23:32:08 EDT 2004
<SNIP>
>
>
> >>> globals()[raw_input("enter name: ")] = 34
> enter name: raw_input
> >>> globals()[raw_input("enter name: ")] = 34
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: 'int' object is not callable
> >>>
>
> Andrew
> dalke at dalkescientific.com
exec and eval is dangerous stuff for the inexperienced. Dictionary is
an excellent idea Andrew. However, if what he wants to do is as simple
as the example he gave, he doesn't even need a dictionary.
More information about the Python-list
mailing list