+= overloading?
Neil Macneale
mac4-devnull at theory.org
Sun Jun 17 00:12:25 EDT 2001
I am creating a colored stringbuffer class, and I want to append words to
the buffer with the '+=' operator. Ex:
>>>csb = CSB("INIT STRING")
>>>csb += "Hello"
>>>print csb
INIT STRINGHello
would be the desired effect. I can't seem to find anything in the lib
docs about overloading that operator though. Am I looking in the wrong
place? It is also important that a new object is NOT created every time
the operator is used, because that would be a waste.
Suggestions? Thanks for any tips!
Neil Macneale
--
To reply to me via email, remove the '-devnull' from my address.
More information about the Python-list
mailing list