Python but even worse
Jump to navigation
Jump to search
Python but even worse is like Python, but it deletes its code if it doesn't raise an error.
It's invented by User:None1.
Example Programs
Hello World
print("Hello World!") raise Exception
Cat Program
import sys print(sys.stdin.read()) 1/0
Interpreter in Python
import os,sys with open(sys.argv[1],"r",encoding="utf-8") as f: c=f.read() try: exec(c) except: pass else: os.remove(sys.argv[1])
Note that it is also possible to write an interpreter in C/C++ using Python C APIs.