Is this actually python?

Was trying to show my son some advanced things like __str__, __add__, raise, math lib, etc. a lot of things were throwing very strange errors. It seems like it’s a subset of python that is parsed into some internal representation?

sadly, we can’t import things like libraries.
Math however, is already imported by default. The Math.(cos,sin,PI,atan2,round,etc) are usable

1 Like

What I meant is that I wrote code that was using __add__ and so forth but it wasn’t working. I got weird errors that implied it was trying to parse the code into an internal representation. So I’m curious if it’s really Python or just a subset?

Also is there a way to turn off the editor line highlighting? It gets out of sync with the code and it’s very jarring to look at.

ok. So.
Question ones answer:
The Python in codecombat is supposed to be beginner-friendly. It ISN’T for logic uses (init, add, etc arent usable) and trust me. I’ve tried multiple times. The Python (and coding) in CodeCombat is meant for beginners to learn the basics of Python (if, for, else, while, etc). If you would like to teach your son these programs, please try teaching him with your coding skill on a platform like Visual Studio instead of relying on codecombat. CodeCombat is meant for people who want to get into coding, not people who already have, and want to dig deeper. Because of this, try:except commands give errors as well. Importing libraries wont work either. Please try finding a different platform to teach your son. The errors "Parse INIT_F (or something along the lines of that) is just a error meaning “You can not use this statement here” or “this statement is not available for this level” or “this isn’t usable in codecombat”.
Question twos answer:
Sadly, there are no known ways to disable the editor line highlighting afaik.

Hope I could help.

Looking in the debugger I found you can simply disable indent-highlight css class using any extensions that lets you add user js/css to a page.

I used the following which works well:

.indent-highlight { display: none; }

I understand it’s supposed to be for teaching beginners. I’m just curious if it’s using a real python interpreter or if it’s something custom that only implements a python like subset.

it’s not real python. (for example, ‘undefined‘ happens in this language)
I think it made from javascript.

1 Like