beeware / batavia

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

Correct repr of exceptions. #803

Closed martica closed 5 years ago

martica commented 5 years ago

Expected Behavior

print(repr(ValueError('a'))) should match the output in Python.

Before 3.7 ValueError('a',)

3.7+ ValueError('a')

Current Behavior

ValueError(a)

Commit in cpython where the behaviour changed: https://github.com/python/cpython/commit/f8a4c03ede6048022f60a58d5a21b278b78a8a16#diff-b49bb0ee9f29e2c8079f1185cf5ed5d1

Additionally: Batavia's exceptions only accept one argument. Python exceptions accept *args.

alexjdw commented 5 years ago

Working on it.