char package¶
Submodules¶
char.main module¶
This is one and only file with working code in the whole package
-
exception
ArgumentTypeError
[source]¶ Bases:
TypeError
Error that type of argument is incorrect
Parameters: TypeError (Exception) – Wrong type of argument was given to function
-
char
(function=None, dict_tuple_types_by_prefix=None, dict_tuple_types_by_prefix_to_update_default=None, bool_is_to_skip_none_value=True)[source]¶ Decorator for checking types of arguments in function
Check is done according to prefices that was given (or default ones) E.G.
Parameters: - function (function, optional) – To call dec without arguments. Defaults to None.
- dict_tuple_types_by_prefix (dict, optional) – Rules how to check types. Defaults to None.
- dict_tuple_types_by_prefix_to_update_default (dict, optional) – Additional to default Rules how to check types. Defaults to None.
- bool_is_to_skip_none_value (bool, optional) – Flag what to do with None values. Defaults to True.
Returns: Decorator without arguments
Return type: function
-
check_type_of_1_argument
(str_function_name, str_argument_name, argument_value, tuple_types_var_can_be)[source]¶ Check type of one argument for function
Parameters: Raises: ArgumentTypeError
– Wrong type of argument, child from TypeError
Module contents¶
-
char
(function=None, dict_tuple_types_by_prefix=None, dict_tuple_types_by_prefix_to_update_default=None, bool_is_to_skip_none_value=True)[source]¶ Decorator for checking types of arguments in function
Check is done according to prefices that was given (or default ones) E.G.
Parameters: - function (function, optional) – To call dec without arguments. Defaults to None.
- dict_tuple_types_by_prefix (dict, optional) – Rules how to check types. Defaults to None.
- dict_tuple_types_by_prefix_to_update_default (dict, optional) – Additional to default Rules how to check types. Defaults to None.
- bool_is_to_skip_none_value (bool, optional) – Flag what to do with None values. Defaults to True.
Returns: Decorator without arguments
Return type: function
-
check_arguments
(function=None, dict_tuple_types_by_prefix=None, dict_tuple_types_by_prefix_to_update_default=None, bool_is_to_skip_none_value=True)¶ Decorator for checking types of arguments in function
Check is done according to prefices that was given (or default ones) E.G.
Parameters: - function (function, optional) – To call dec without arguments. Defaults to None.
- dict_tuple_types_by_prefix (dict, optional) – Rules how to check types. Defaults to None.
- dict_tuple_types_by_prefix_to_update_default (dict, optional) – Additional to default Rules how to check types. Defaults to None.
- bool_is_to_skip_none_value (bool, optional) – Flag what to do with None values. Defaults to True.
Returns: Decorator without arguments
Return type: function
-
check_types_of_arguments
(function=None, dict_tuple_types_by_prefix=None, dict_tuple_types_by_prefix_to_update_default=None, bool_is_to_skip_none_value=True)¶ Decorator for checking types of arguments in function
Check is done according to prefices that was given (or default ones) E.G.
Parameters: - function (function, optional) – To call dec without arguments. Defaults to None.
- dict_tuple_types_by_prefix (dict, optional) – Rules how to check types. Defaults to None.
- dict_tuple_types_by_prefix_to_update_default (dict, optional) – Additional to default Rules how to check types. Defaults to None.
- bool_is_to_skip_none_value (bool, optional) – Flag what to do with None values. Defaults to True.
Returns: Decorator without arguments
Return type: function