T
tac-tics
Python is a crazy language when it comes to object versatility. I know
I can do:
.... def __init__(self):
.... pass
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 =-)
I can do:
.... def __init__(self):
.... pass
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 =-)