[Tutor] Declaring methods in modules.
cfuller084 at thinkingplanet.net
Sun Apr 11 18:57:50 CEST 2010
Sorry, should have included a concrete example. Although, as the others have
said, I'm not sure how it helps with what you (seem) to want to do.
0 % cat bar.py
0 % cat foo.py
setattr(A, '__call__', bar.the_answer)
setattr(B, '__call__', bar.the_answer)
0 % python foo.py
More information about the Tutor