Very much done
This commit is contained in:
19
test.py
19
test.py
@@ -1,8 +1,23 @@
|
||||
from utils.Singleton import Singleton
|
||||
class A(metaclass=Singleton):
|
||||
class A:
|
||||
def __init__(self, a):
|
||||
self.a = a
|
||||
def printa(self):
|
||||
print(self.a)
|
||||
def test2(self, _):
|
||||
print(34)
|
||||
|
||||
def test3(self):
|
||||
print(5)
|
||||
|
||||
class B(A):
|
||||
def test(self, fun):
|
||||
fun(self)
|
||||
def test3(self, a):
|
||||
super().test3()
|
||||
print(a)
|
||||
|
||||
class C:
|
||||
def __init__(self):
|
||||
self.foo()
|
||||
def foo(self):
|
||||
self.a = 10
|
||||
|
||||
Reference in New Issue
Block a user