main module#

main.main(argv=None) int[source]#

Main function.

Parameters:

argv (list, default = None) – Arguments passed to argparse.

Returns:

product – The product of given arguments.

Return type:

int

Examples

>>> from main import main
>>> product = main(["-f1", "1", "-f2", "2"])
>>> product
2
>>> product = main(["-f1", "3"])
>>> product
6
main.my_product(x: int, y: int) int[source]#

Returns the product of two integer numbers.

Parameters:
  • x (int) – The first factor.

  • y (int, default = 2) – The second factor.

Returns:

product – The product of x and y.

Return type:

int

Examples

>>> from main import my_product
>>> product = my_product(1, 2)
>>> product
2