Message23130
Logged In: YES
user_id=6656
Oh, sorry, I think I got that a bit wrong. The issue is more with
bound/unbound methods -- given
class O(object):
def __repr__(self):
...
should O.__repr__ be a bound method (O is an instance of type)
or an unbound method so O.__repr__(O()) does what you expect?
Python chooses the latter, but this means that you can't implement
the builtin function repr as
def repr(o):
return o.__repr__()
Hope this helps, a little at least. |
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:27:27 | admin | link | issue1066490 messages |
| 2007-08-23 14:27:27 | admin | create | |
|