pyre.schemata.Fraction

Module Contents

class pyre.schemata.Fraction.Fraction(default=fractions.Fraction(), **kwds)

Bases: pyre.schemata.Numeric.Numeric

A type declarator for fixed point numbers

typename = fraction
ncomplaint = could not coerce {0.value!r) into a fraction
coerce(self, value, **kwds)

Attempt to convert {value} into a fraction

json(self, value)

Generate a JSON representation of {value}