Package lib :: Module check_types
[hide private]
[frames] | no frames]

Module check_types

source code

Special module for checking types.

Functions [hide private]
bool
is_complex(num)
Check if the given number is a Python or numpy complex.
source code
bool
is_filetype(obj)
Check if the given Python object is a file.
source code
bool
is_filetype_readable(obj)
Check if the given Python object can operate as a readable file.
source code
bool
is_filetype_rw(obj)
Check if the given Python object can operate as both a readable and writable file.
source code
bool
is_filetype_writable(obj)
Check if the given Python object can operate as a writable file.
source code
bool
is_float(num)
Check if the given number is a Python or numpy float.
source code
bool
is_int(num)
Check if the given number is a Python or numpy int.
source code
bool
is_list(val)
Check if the given value is a Python list.
source code
bool
is_list_of_lists(val)
Check if the given value is a Python list of lists.
source code
bool
is_num(num)
Check if the given number is a Python or numpy int or float.
source code
bool
is_unicode(obj)
Check if the given Python object is a unicode string.
source code
Variables [hide private]
  __package__ = 'lib'

Imports: complex64, complex128, float32, float64, int16, int32, complex256, float16, float128, int8, int64, IOBase, StringIO, unicode


Function Details [hide private]

is_complex(num)

source code 

Check if the given number is a Python or numpy complex.

Parameters:
  • num (anything.) - The number to check.
Returns: bool
True if the number is a complex, False otherwise.

is_filetype(obj)

source code 

Check if the given Python object is a file.

Parameters:
  • obj (anything) - The Python object.
Returns: bool
True if the object is a file, False otherwise.

is_filetype_readable(obj)

source code 

Check if the given Python object can operate as a readable file.

Parameters:
  • obj (anything) - The Python object.
Returns: bool
True if the object can operate as a readable file, False otherwise.

is_filetype_rw(obj)

source code 

Check if the given Python object can operate as both a readable and writable file.

Parameters:
  • obj (anything) - The Python object.
Returns: bool
True if the object can operate as both a readable and writable file, False otherwise.

is_filetype_writable(obj)

source code 

Check if the given Python object can operate as a writable file.

Parameters:
  • obj (anything) - The Python object.
Returns: bool
True if the object can operate as a writable file, False otherwise.

is_float(num)

source code 

Check if the given number is a Python or numpy float.

Parameters:
  • num (anything.) - The number to check.
Returns: bool
True if the number is a float, False otherwise.

is_int(num)

source code 

Check if the given number is a Python or numpy int.

Parameters:
  • num (anything.) - The number to check.
Returns: bool
True if the number is a int, False otherwise.

is_list(val)

source code 

Check if the given value is a Python list.

Parameters:
  • val (anything.) - The value to check.
Returns: bool
True if the value is a list, False otherwise.

is_list_of_lists(val)

source code 

Check if the given value is a Python list of lists.

Parameters:
  • val (anything.) - The value to check.
Returns: bool
True if the value is a list of lists, False otherwise.

is_num(num)

source code 

Check if the given number is a Python or numpy int or float.

Parameters:
  • num (anything.) - The number to check.
Returns: bool
True if the number is an int or float, False otherwise.

is_unicode(obj)

source code 

Check if the given Python object is a unicode string.

Parameters:
  • obj (anything) - The Python object.
Returns: bool
True if the object is a unicode string, False otherwise.