Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 68b6874

Browse files
committed
Issue #25432: Explain isinstance behaviour when type is a tuple.
1 parent df2660e commit 68b6874

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,10 +702,10 @@ are always available. They are listed here in alphabetical order.
702702
Return true if the *object* argument is an instance of the *classinfo*
703703
argument, or of a (direct, indirect or :term:`virtual <abstract base
704704
class>`) subclass thereof. If *object* is not
705-
an object of the given type, the function always returns false. If
706-
*classinfo* is not a class (type object), it may be a tuple of type objects,
707-
or may recursively contain other such tuples (other sequence types are not
708-
accepted). If *classinfo* is not a type or tuple of types and such tuples,
705+
an object of the given type, the function always returns false.
706+
If *classinfo* is a tuple of type objects (or recursively, other such
707+
tuples), return true if *object* is an instance of any of the types.
708+
If *classinfo* is not a type or tuple of types and such tuples,
709709
a :exc:`TypeError` exception is raised.
710710

711711

0 commit comments

Comments
 (0)