Generate a new object each time a name is imported

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sun Aug 2 12:49:33 CEST 2009


On Sun, 02 Aug 2009 12:33:03 +0200, Peter Otten wrote:

> How about
[snip]
>>>> import sys
>>>> sys.modules["yadda"] = A()

Perfect! That's exactly the sort of thing I'm looking for.

Thanks for everyone who answered.




-- 
Steven



More information about the Python-list mailing list