• I was quite excited about this tool. Then disappointed to find out that the interpreter doesn’t implement the Python language correctly. Literally the first I thing I tried didn’t work the way it should: Python guarantees that sorting is stable, so if you run sorted(mylist, key=...) twice with different key keywords, the first sort should be preserved. But that didn’t work in Withcode. Too bad.

Viewing 1 replies (of 1 total)
  • Plugin Author pddring

    (@pddring)

    Thanks for your comments. Sorry to hear you’re disappointed. You’re right, the Python interpreter uses Skulpt which is an in-browser javascript emulation of a subset of the Python language. It’s designed for teachers and students just starting out with Python but as you go beyond the basics you’ll soon find things that don’t quite work as expected.

    If you want a ‘proper’ online python interpreter try repl.it which runs your code on a sandboxed remote server. This gets you a better level of compatibility but you lose some of the responsiveness of running the code in your browser.

    Would you be willing to provide more information about the code you tested and what should happen and I’ll do my best to fix it? You can contact me via https://blog.withcode.uk/about/contact/

Viewing 1 replies (of 1 total)
  • The topic ‘interpreter doesn’t adhere to Python language’ is closed to new replies.