Complete set of magic methods
Issue #93
resolved
Lea provides support for some functions like abs
and divmod
, by overloading associated dunder methods:
>>> abs(vals(-2, -2, 0, 2))
0 : 0.25
2 : 0.75
>>> divmod(vals(0, 1, 2, 3), vals(1, 2))
(0, 0) : 0.25
(0, 1) : 0.125
(1, 0) : 0.25
(1, 1) : 0.125
(2, 0) : 0.125
(3, 0) : 0.125
However, several methods are not implemented, like floor
, ceil
, etc. Also, the shift operators are not supported.
Lea should implement these, to be more consistent.
Comments (2)
-
reporter -
reporter - changed status to resolved
- Log in to comment
Implement missing dunder methods (refs
#93)→ <<cset 1980706dee71>>