[Python-checkins] cpython (3.4): Issue #25432: Explain isinstance behaviour when type is a tuple.
terry.reedy
python-checkins at python.org
Wed Oct 28 03:16:03 EDT 2015
https://hg.python.org/cpython/rev/8b1418e5dcc8
changeset: 98873:8b1418e5dcc8
branch: 3.4
parent: 98869:041701817c5d
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Wed Oct 28 03:14:56 2015 -0400
summary:
Issue #25432: Explain isinstance behaviour when type is a tuple.
files:
Doc/library/functions.rst | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -702,10 +702,10 @@
Return true if the *object* argument is an instance of the *classinfo*
argument, or of a (direct, indirect or :term:`virtual <abstract base
class>`) subclass thereof. If *object* is not
- an object of the given type, the function always returns false. If
- *classinfo* is not a class (type object), it may be a tuple of type objects,
- or may recursively contain other such tuples (other sequence types are not
- accepted). If *classinfo* is not a type or tuple of types and such tuples,
+ an object of the given type, the function always returns false.
+ If *classinfo* is a tuple of type objects (or recursively, other such
+ tuples), return true if *object* is an instance of any of the types.
+ If *classinfo* is not a type or tuple of types and such tuples,
a :exc:`TypeError` exception is raised.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list