Comment by Scubabear68
11 hours ago
I was very disappointed that this is “interpreting” some tiny made up language.
This is not Python, or even within three orders of magnitude of Python.
11 hours ago
I was very disappointed that this is “interpreting” some tiny made up language.
This is not Python, or even within three orders of magnitude of Python.
Yeah the amount of Python code that would work here is probably not a lot more than this specific FizzBuzz example. Lots of shortcuts taken, which I guess is understandable.
It’s true, the title should have said “Python-like”
TBF the fizzbuzz code works just fine in CPython.
Indeed, for some code, CPython and this interpreter produce identical output. I gave it an upboat.
I like python subset. However, many don't see it that way.
You're right, mathematically it's undeniably true. However...
One could imagine an even smaller subset interpreter. It's an interpreter for a subset of Python, consisting only of the programs that print "Hello World". Since it doesn't do any error checking, for all other programs the output is undefined. Implementing it is very simple: Just ignore the input file, and print "Hello World". As a bonus, it's an interpreter for the subset of "Hello World" programs in all other programming languages too!
</tongue-in-cheek>
It's not a subset of python.
For instance this program works in this interpreter, but not in python: