Back to index

python3.2  3.2.2
Public Member Functions
test.test_typechecks.SubInt Class Reference
Inheritance diagram for test.test_typechecks.SubInt:
Inheritance graph
Collaboration diagram for test.test_typechecks.SubInt:
Collaboration graph

List of all members.

Public Member Functions

def __instancecheck__
def __subclasscheck__

Detailed Description

Definition at line 24 of file

Member Function Documentation

def test.test_typechecks.ABC.__instancecheck__ (   cls,
) [inherited]
Implement isinstance(inst, cls).

Definition at line 9 of file

00010     def __instancecheck__(cls, inst):
00011         """Implement isinstance(inst, cls)."""
00012         return any(cls.__subclasscheck__(c)
00013                    for c in {type(inst), inst.__class__})

Here is the call graph for this function:

def test.test_typechecks.ABC.__subclasscheck__ (   cls,
) [inherited]
Implement issubclass(sub, cls).

Definition at line 14 of file

00015     def __subclasscheck__(cls, sub):
00016         """Implement issubclass(sub, cls)."""
00017         candidates = cls.__dict__.get("__subclass__", set()) | {cls}
00018         return any(c in candidates for c in sub.mro())

Here is the call graph for this function:

The documentation for this class was generated from the following file: