picop.cytype#

Type-object helpers.

picop.cytype.type_check(o)#

Return True if o is a type object or subtype (PyType_Check).

Parameters:

o (object)

Return type:

bool

picop.cytype.type_check_exact(o)#

Return True if type(o) is type (PyType_CheckExact).

Parameters:

o (object)

Return type:

bool

picop.cytype.type_eq(a, b)#

Return True if a is b (type-object identity; not metaclass __eq__).

Parameters:
Return type:

bool

picop.cytype.type_get_dict(typ)#

Return the underlying type dictionary (not a mappingproxy). Read-only.

Parameters:

typ (type)

Return type:

dict

picop.cytype.type_get_name(typ)#

Return the type’s name from tp_name.

Parameters:

typ (type)

Return type:

str

picop.cytype.type_get_qualname(typ)#

Return the type’s qualified name.

Parameters:

typ (type)

Return type:

str

picop.cytype.type_is_subtype(a, b)#

Return True if a is a subtype of b (PyType_IsSubtype).

Parameters:
Return type:

bool