4 ms·
The "self" argument is great. It is the reason why methods in Python are normal functions and not special "methods". It also makes this pointless but interesti
by rincewind 18y ago
The "self" argument is great. It is the reason why methods in Python are normal functions and not special "methods".
It also makes this pointless but interesting piece of code possible:
class foo(object):
def subclassme(self):
class subclass(type(self)):
def __init__(self2):
self2.parentobj=self
return subclass()