logoalt Hacker News

benatkintoday at 1:31 AM3 repliesview on HN

I like python subset. However, many don't see it that way.


Replies

tyilotoday at 7:27 AM

It's not a subset of python.

For instance this program works in this interpreter, but not in python:

    fxx i in rxxxx(10):
        pxxxx(i)
hmrytoday at 2:09 AM

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>