package_name_to_import_with package#
Subpackages#
Submodules#
- package_name_to_import_with.data_using_module module
PackageMetadata
PackageMetadata.Name
PackageMetadata.Version
PackageMetadata.Description
PackageMetadata.Keywords
PackageMetadata.License
PackageMetadata.Maintainers
PackageMetadata.Authors
PackageMetadata.Links
PackageMetadata.Name
PackageMetadata.Version
PackageMetadata.Description
PackageMetadata.Keywords
PackageMetadata.License
PackageMetadata.Maintainers
PackageMetadata.Authors
PackageMetadata.Links
PackageMetadata.model_computed_fields
PackageMetadata.model_config
PackageMetadata.model_fields
- package_name_to_import_with.garbage_collection_module module
- package_name_to_import_with.simplify module
Module contents#
Expose selected package contents.
- class BinaryArithmeticOperator(value)[source]#
-
Define supported arithmetic operators.
- ADDITION = '+'#
- SUBTRACTION = '-'#
- MULTIPLICATION = '*'#
- DIVISION = '/'#
- calculate_results(first_input, operator, second_input)[source]#
Perform basic binary arithmetic expressions.
- Parameters:
first_input (
float
) -- left operand of binary arithmetic expressionoperator (
BinaryArithmeticOperator
) -- kind of binary arithmetic expressionsecond_input (
float
) -- right operand of binary arithmetic expression
- Returns:
result of binary arithmetic expression
- Return type:
Examples
>>> from package_name_to_import_with import calculate_results >>> calculate_results(1, "+", 2) 3.0 >>> calculate_results(1, "-", 2) -1.0 >>> calculate_results(1, "*", 2) 2.0 >>> calculate_results(1, "/", 2) 0.5
- define_garbage_collection_decorator(function_to_be_decorated)[source]#
Perform forcefully garbage collection after execution of provided function.
- Parameters:
function_to_be_decorated (
FunctionType
) -- function whose execution may require forceful garbage collection- Returns:
decorated function
- Return type:
FunctionType
- solve_simplification(expression)[source]#
Evaluate arithmetic expression.
- Parameters:
expression (
str
) -- standard arithmetic expression- Returns:
result of arithmetic expression
- Return type:
Examples
>>> from package_name_to_import_with import solve_simplification >>> solve_simplification("0 + 1 - 2 * 3 / 4") -0.5 >>> solve_simplification("5 * 6 / (7 + 8) - 9") -7.0