Fraction

Latest version: v2.2.0

Safety actively analyzes 629639 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

1.2.0

1.1.0

0.6666

0.25

f4 = Fraction('0.5', '1/4')


All the combinations of strings, decimals and fractional strings are valid on both numerator and denominator.

Also now you can convert a `Fraction` object into a `float` string

>>> Fraction('2/3').todecimal(decplaces=4)

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.