8000 super object has no attribute __new__ · Issue #1437 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
super object has no attribute __new__ #1437
Closed
@Singein

Description

@Singein
>>> class A(object):
        _instance = None
...     def __new__(cls):
...         if not cls._instance:
...             cls._instance = super(A, cls).__new__(cls)
...         return cls._instance
...         
... 
>>> a = A()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in __new__
AttributeError: 'super' object has no attribute '__new__'

Is this feature implemented?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0