differentmatt / filbert

JavaScript parser of Python
Other
133 stars 27 forks source link

Add sort function for lists #42

Closed bhargavvader closed 9 years ago

bhargavvader commented 9 years ago

Added list.sort() method. Checks if the list has numbers and sorts them in ascending order or lexicographically otherwise.

differentmatt commented 9 years ago

Looks good @bhargavvader!

Can you add some test coverage for these changes? https://github.com/differentmatt/filbert/blob/master/test/spec/lists_spec.js

You can run the tests via grunt test from the repository root.

bhargavvader commented 9 years ago

@differentmatt Added the test cases and a commit that allows passing a key function (as in Python3). Fixes #38 and #26.

differentmatt commented 9 years ago

Awesome, thanks @bhargavvader!