beeware / batavia

A JavaScript implementation of the Python virtual machine.
http://pybee.org/batavia
Other
1.39k stars 424 forks source link

Add fallback and remove unneeded implementations #776

Closed martica closed 5 years ago

martica commented 5 years ago

This adds a fallback in the virtual machine from inplace binary operators to standard binary operators.

Many of the standard datatypes were defining the inplace operators explicitly, either as a copy of the binary operators, or an explicit fallback. Having unneeded magic methods defined will get in the way of implementing things where fallback behaviour is needed like the __radd__ and friends operations.

Refs #46

PR Checklist:

martica commented 5 years ago

The remaining test failures here are preexisting.

danyeaw commented 5 years ago

The remaining failing tests are failing in master as well.

@martica Congrats on your first contribution! :tada: