[issue24515] docstring of isinstance

2015-07-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Closing. If anyone thinks the docs aren't clear enough, and has an alternate version they would like to suggest, you can re-open it. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue24515] docstring of isinstance

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Right. Close this unless something else is offered. -- ___ Python tracker ___ ___ Python-bugs-list

[issue24515] docstring of isinstance

2015-06-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, Jun 26, 2015 at 09:20:18PM +, Terry J. Reedy wrote: > I agree that the tuple explanation if ok. But "Return whether an > object is an instance of a class or of a subclass thereof." (3.5) > seems wrong. I believe 'subclass' should be 'superclass'

[issue24515] docstring of isinstance

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the tuple explanation if ok. But "Return whether an object is an instance of a class or of a subclass thereof." (3.5) seems wrong. I believe 'subclass' should be 'superclass'. >>> class C: pass >>> class Csub(C): pass >>> isinstance(C(), C

[issue24515] docstring of isinstance

2015-06-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: It already does: "The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for isinstance(x, A) or isinstance(x, B) or ... (etc.)." If it were "all", it would use "and", not "or". I don't think any change is needed. Do you have a suggestion for new w

[issue24515] docstring of isinstance

2015-06-26 Thread Luc Saffre
New submission from Luc Saffre: The docstring of built-in function 'isinstance' should explain that if the classinfo is a tuple, the object must be instance of *any* (not *all*) of the class objects. -- assignee: docs@python components: Documentation messages: 245841 nosy: Luc Saffre,