Using the continued fraction method for splitting. All information here.
Yeah, static typing is cool. (PEP 484 & PEP 526)
I didn't use
typing.cast
, because in doc saysThis returns the value unchanged
, i.e. purebla-bla-bla
function.
Python 3.6
~# pip install pipenv (if you doesn't have it)
~# pipenv install
~# python shell
~# pytest
Output:
==================== test session starts ====================
platform darwin -- Python 3.6.5, pytest-3.6.0, py-1.5.3, pluggy-0.6.0
rootdir: /bla-bla-bla/fraction, inifile:
collected 1 item
test_fraction.py . [100%]
==================== 1 passed in 0.14 seconds ====================