Skip to main content

type_check

is_roughly_correct_type (obj, type_) -> bool

Check if obj is roughly correct type.

The roughly correct type means that the first element of the sequence and mapping only checked.

Parameters

  • obj(Any) : target object
  • type_(Any) : target type

Returns

  • bool : True if obj is roughly correct type, otherwise False

raise_type_error (varname, obj, type) -> -

Raise TypeError.

Parameters

  • obj(Any) : target object
  • type_(Any) : target type