jacopy.Rational¶
- class jacopy.Rational(p, q=1)¶
Bases:
AtomA rational number
p/qin lowest terms withq > 0.Automatically collapses to
Integerwhen the denominator is one after reduction.Methods
__init__(p[, q])clone()Return
self.find(predicate)Yield descendants (including self) satisfying
predicate.replace_at(path, new)Return a new tree with
newspliced atpath.substitute_atom(dummy, target)Return
selfwith every occurrence ofdummyreplaced bytarget.walk()Pre-order traversal yielding
selffollowed by descendants throughchildrenonly.Attributes
childrenTuple of immediate children.
is_atompq