summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-10-28 07:14:46 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-10-28 07:14:46 (GMT)
commit0a1ba709493656cb6f450c0ec3d07566185104b4 (patch)
tree03830038b175953925b67a2d6bbdf4a638535f61
parent8048776170c474cac2d835ee45d615df3c308dbb (diff)
downloadcpython-0a1ba709493656cb6f450c0ec3d07566185104b4.zip
cpython-0a1ba709493656cb6f450c0ec3d07566185104b4.tar.gz
cpython-0a1ba709493656cb6f450c0ec3d07566185104b4.tar.bz2
Issue #25432: Explain isinstance behaviour when type is a tuple.
-rw-r--r--Doc/library/functions.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8fac448..8b677ed 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -687,10 +687,10 @@ section.
is a type object (new-style class) and *object* is an object of that type or of
a (direct, indirect or :term:`virtual <abstract base class>`) subclass
thereof. If *object* is not a class instance or
- an object of the given type, the function always returns false. If *classinfo*
- is neither a class object nor a type object, it may be a tuple of class or type
- objects, or may recursively contain other such tuples (other sequence types are
- not accepted). If *classinfo* is not a class, type, or tuple of classes, types,
+ an object of the given type, the function always returns false.
+ If *classinfo* is a tuple of class or type objects (or recursively, other
+ such tuples), return true if *object* is an instance of any of the classes
+ or types. If *classinfo* is not a class, type, or tuple of classes, types,
and such tuples, a :exc:`TypeError` exception is raised.
.. versionchanged:: 2.2
@@ -1762,4 +1762,3 @@ bypass these functions without concerns about missing something important.
.. [#] In the current implementation, local variable bindings cannot normally be
affected this way, but variables retrieved from other scopes (such as modules)
can be. This may change.
-