Message158887
pydoc fails on custom instances in specific cases. (When instance __name__ does not resolve to a str).
This is a small example:
>>> import pydoc
>>> class A:
... def __getattr__(self, name):
... return True
...
>>> print(pydoc.render_doc(A))
Python Library Documentation: class A in module __main__
(...)
>>> print(pydoc.render_doc(A()))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./Lib/pydoc.py", line 1534, in render_doc
if name and '.' in name:
TypeError: argument of type 'bool' is not iterable |
|
Date |
User |
Action |
Args |
2012-04-20 20:45:23 | flox | set | recipients:
+ flox |
2012-04-20 20:45:23 | flox | set | messageid: <1334954723.85.0.214601064543.issue14638@psf.upfronthosting.co.za> |
2012-04-20 20:45:23 | flox | link | issue14638 messages |
2012-04-20 20:45:23 | flox | create | |
|