|
|
|
|
|
by reinhardt
5298 days ago
|
|
The above doesn't really work as the builtin object class doesn't allow extra attributes. Still any pure Python class does by default: class Foo(object):
pass
foo = Foo()
foo.name = ...
def hello(self):
...
foo.hello = hello
|
|