I have one weird problem. I have following code:
class A:
def f():
return __class__()
class B(A):
pass
a = A.f()
b = B.f()
print(a, b)
And output is something like this:
<__main__.A object at 0x01AF2630> <__main__.A object at 0x01B09B70>
So how can I get B
instead of second A
?