mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
Accordingly, don't ask to modify "overridden" constructor of a base class. Unlike other methods, constructors in the hierarchy usually don't mean to have identical signatures, thus it's not safe to blindly sync them this way. GitOrigin-RevId: 61e300914831c726afea3928acd110fea8428df8
16 lines
302 B
Python
16 lines
302 B
Python
class Super:
|
|
def __new__(cls):
|
|
return super().__new__(cls)
|
|
|
|
|
|
class Target(Super):
|
|
def __new__(cls, foo, bar):
|
|
print(foo)
|
|
return super().__new__(cls)
|
|
|
|
|
|
class Sub(Target):
|
|
def __new__(cls, foo, extra):
|
|
print(extra)
|
|
return super().__new__(cls, foo, 42)
|