module not callable - why not?

Fredrik Lundh fredrik at pythonware.com
Mon Apr 19 13:54:12 EDT 2004


Hung Jung Lu wrote:

> > That's not the only answer, and it's not the one I use:
> >
> >     import foo
> >     getattr(foo, 'name')
>
> You can't do this when you are inside the module itself.

inside the module, it's spelled

    name

</F>







More information about the Python-list mailing list