New submission from Florent Xicluna <[email protected]>:
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
----------
components: Library (Lib)
messages: 158887
nosy: flox
priority: normal
severity: normal
status: open
title: pydoc error on instance of a custom class
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14638>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com