Generate a new object each time a name is imported

Steven D'Aprano steve at
Sun Aug 2 12:49:33 CEST 2009

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

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

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

Thanks for everyone who answered.


More information about the Python-list mailing list