Complete set of magic methods

Issue #93 resolved
Pierre Denis repo owner created an issue

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)

  1. Log in to comment