Open nemoyatpeace opened 10 years ago
Python operations on strings are largely unsupported at the moment. We'll have to change that.
Negative indexes do not currently work, and are tracked in #22.
Slices should be working fine on lists and tuples. But, please let us know if you find issues with them.
You can test the Python parser outside of CodeCombat using this demo page: https://rawgit.com/differentmatt/filbert/master/test/interactive.html
Thanks for the feedback!
OK, thanks, would love to see the python parser improved! Don't know that I could actually help with it other than debugging and letting you know when I find problems.
Debugging and filing issues is very helpful, so thanks for that.
When you're ready to dig in and fix some issues, just let me know. I'm sure we can find some suitable tasks to get you started :)
lambda doesn't seem to work either, but I'm assuming you already have that listed somewhere. Do you have a list of the things you are missing?
Most of the unsupported keywords have issues filed, but if you don't see something there feel free to file a new issue. Lambda is tracked in #4.
It appears that the python parser has issues with indexes for strings (and I would assume arrays as well). Using negative numbers and using slices doesn't seem to work.
Negative indexes:
The order function should not run, but it does. When I change it to:
The order function is not run.
Slices:
message[:2]
message[4:9]
message[2:9:3]
None of these seem to work. (Though I only tested the first 2 methods).
So apparently python's extra ways of dealing with string indexing doesn't work.