3 ms·
You can assign arbitrary attributes to a plain function: >>> def f(): ... print f.something ... >>> f.something = 'blah' >>> f() blah
by euccastro 15y ago
You can assign arbitrary attributes to a plain function:
>>> def f():
... print f.something
...
>>> f.something = 'blah'
>>> f()
blah