Here is the code that I've described above:
class _a:
def __call__(self, v):
print v
def func():
"""I would like to do something
with ´content´ here"""
class x:
def __init__(self):
self.content = [ ]
a = _a()
Now I would like to be able to say
inst = x()
x.a(5)
x.a.func()
where the second line prints '5' as expected, but I don't know how to make the third line change 'x.content'. I guess I'm missing some basic concepts in object oriented programming...
-- http://mail.python.org/mailman/listinfo/python-list