Back to index

python3.2  3.2.2
Public Member Functions | Static Private Attributes
test.test_typechecks.Integer Class Reference
Inheritance diagram for test.test_typechecks.Integer:
Inheritance graph
Collaboration diagram for test.test_typechecks.Integer:
Collaboration graph

List of all members.

Public Member Functions

def __instancecheck__
def __subclasscheck__

Static Private Attributes

dictionary __subclass__ = {int}

Detailed Description

Definition at line 20 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:

Member Data Documentation

Definition at line 21 of file

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