beeware / batavia

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

Refactoring abs, all, any and bin #808

Closed martica closed 5 years ago

martica commented 5 years ago

This updates abs to support any object with an abs method. (And adds an bool.abs) This updates any and all to support sequences defined with len and getitem. This updates bin to support any object with an index method. (And adds bool.index and int.index)

Additionally abs, any, all and bin have their doc strings updated from 3.4 to the 3.5-3.7 state.

PR Checklist: