module not callable - why not?
fredrik at pythonware.com
Tue Apr 20 08:28:54 CEST 2004
Hung Jung Lu wrote:
> > inside the module, it's spelled
> > name
> > </F>
> Can't believe I have to reply to all these silly bursts. :)
> This is a frequently asked question, Fredrik. I don't make it up. Now,
> think again why newbies and oldies alike at times need to access
> variables by name strings. Next time, digest first before you post.
it's a common question from people who know certain other scripting languages
but not Python, and don't know how to use dictionaries and other data structures
to get the result they're after. globals() is hardly ever the right answer.
frankly, are you sure *you* know Python well enough to write *Python* pro-
grams in Python? given the things you complain about, I'm not so sure.
More information about the Python-list