setattr inside a module

kramb64 kramb64 at
Wed Mar 23 11:35:34 CET 2005

I'm trying to use setattr inside a module.
>From outside a module it's easy:

import spam
setattr(spam, name, value)

But if I want to do this inside the module spam itself, what I've to
pass to setattr as first argument?

Thanks a lot for your time.

More information about the Python-list mailing list