![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: "Aliasing" an object's __str__ to a different method
From: Christopher Subich <spam.csubich+block@block.subich.spam.com>
Date: Sat Jul 23 2005 - 05:14:42 CEST
ncf wrote:
Actually, I did a bit of experimenting. If the __str__ reassignment
To paste the class definition again:
Notice the % (self) in Edit and View -- those recursively call
In the spirit of getting the class working, though, the class-method
def View(self):
def setEdit(self):
def setView(self):
(Notice that I've removed the string substitution in Edit and View.
I also would be interested in knowing why new-style classes treat
|