astra.contrib.thecannon.main¶
Module Contents¶
Functions¶
math(arg1, arg2, arith_operator=’+’) |
Performs an arithmetic operation. |
-
astra.contrib.thecannon.main.math(arg1, arg2, arith_operator='+')¶ Performs an arithmetic operation.
This function accepts to numbers and performs an arithmetic operation with them. The arithmetic operation can be passed as a string. By default, the addition operator is assumed.
Parameters: - arg1,arg2 (float) – The numbers that we will sub/subtract/multiply/divide.
- arith_operator ({'+', '-', '*', '/'}) – A string indicating the arithmetic operation to perform.
Returns: result (float) – The result of the arithmetic operation.
Example
>>> math(2, 2, arith_operator='*') >>> 4
-
class
astra.contrib.thecannon.main.MyClass(arg1, arg2, kwarg1='a')¶ A description of the class.
The top docstring in a class describes the class in general, and the parameters to be passed to the class
__init__.Parameters: Variables: name (str) – A description of what names gives acces to.
-
do_something(self)¶ A description of what this method does.
-
do_something_else(self, param)¶ A description of what this method does.
If the class only has one or two arguments, you can describe them inline.
paramis the parameter that we use to do something else.
-