Message15725
I see that in Python 2.3b1 many problems of super
have been fixed, but this one is still there:
I cannot retrieve the __name__ of a super object.
This generates problems with pydoc, for instance:
>>> class C(B):
... sup=super(B)
>>> help(C)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site.py", line 293, in
__call__
return pydoc.help(*args, **kwds)
File "/usr/local/lib/python2.3/pydoc.py", line 1539,
in __call__
self.help(request)
File "/usr/local/lib/python2.3/pydoc.py", line 1575,
in help
else: doc(request, 'Help on %s:')
File "/usr/local/lib/python2.3/pydoc.py", line 1368,
in doc
pager(title % desc + '\n\n' + text.document(object,
name))
File "/usr/local/lib/python2.3/pydoc.py", line 279,
in document
if inspect.isclass(object): return
self.docclass(*args)
File "/usr/local/lib/python2.3/pydoc.py", line 1122,
in docclass
lambda t: t[1] == 'method')
File "/usr/local/lib/python2.3/pydoc.py", line 1057,
in spill
name, mod, object))
File "/usr/local/lib/python2.3/pydoc.py", line 280,
in document
if inspect.isroutine(object): return
self.docroutine(*args)
File "/usr/local/lib/python2.3/pydoc.py", line 1145,
in docroutine
realname = object.__name__
AttributeError: 'super' object has no attribute
'__name__'
P.S. I seem to remember I already submitted this
bug (or feature request, as you wish ;) but I don't
find it in bugtracker and I had no feedback; maybe
it wasn't sent at all due to some connection problem.
If not, please accept my apologies.
Michele Simionato |
|
Date |
User |
Action |
Args |
2007-08-23 14:12:54 | admin | link | issue729103 messages |
2007-08-23 14:12:54 | admin | create | |
|