beeware / batavia

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

Added Error Catching for Unsupported Types to Builtin int() #745

Closed nicklambourne closed 6 years ago

nicklambourne commented 6 years ago

Details:

Add python-compliant TypeError handling for complex, dict, frozenset, list, None, NotImplemented, range, set, slice, and tuple. Later commit added handling for classes and bytearrays.

Problem:

The implementation of int() did not correctly catch errors related to the passing of unsupported types.

Fixes:

Contributes to fixing #47 [Finish implementation of builtins].

PR Checklist: