Python is a crazy language when it comes to object versatility. I know I can do:
>>> class test: ... def __init__(self): ... pass >>> x = test() >>> def fun(): ... print "fun" >>> x.fun = fun >>> x.fun() fun >>> However, experimenting shows that these attached functions are not bound to the object. They do not accept the 'self' parameter. I want to know how one goes about doing that. How do I bind a function to an object to act as if it were a method? It looks like the classmethod() built-in looks *similar* to what I want to do, but not quite. Any help would be awesome =-) -- http://mail.python.org/mailman/listinfo/python-list