Message158887
| Author |
flox |
| Recipients |
flox |
| Date |
2012年04月20日.20:45:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334954723.85.0.214601064543.issue14638@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|