Python3.7 singleton is not unique anymore

Ethan Furman ethan at stoneleaf.us
Tue Sep 17 13:14:18 EDT 2019


On 09/17/2019 09:45 AM, Eko palypse wrote:

> else:
>      class FOO():
>          def __init__(self, metaclass=Singleton):

In your test code, the `metaclass=Singleton` should be in `class Foo`:

     class FOO(metaclass=Singleton):
         ...

--
~Ethan~



More information about the Python-list mailing list