suggestions for functional style (singleton pattern?)
Paul Rubin
no.email at nospam.invalid
Sun Mar 1 01:23:02 EST 2015
yves at zioup.com writes:
> Are there better ways to address this? Any suggestion on this style?
I guess I don't completely understand the question. But one way to do a
singleton in python is put the initialization code into a separate
module. Then the first time you import the module, the code runs, but
it doesn't re-run on subsequent imports.
More information about the Python-list
mailing list