Create a python file that only contains this function def increase_by_one(i): # this increments i f=open(__file__).read() st=f[28:-92][0] return i+f.count(st) Then you can import this function and it will raise an index error if the comment is not there, coming close to the most literal way Any code which does not contain the comment "this increments i:" will produce a compile error and fail to run. could be interpreted in python
Create a python file that only contains this function
Then you can import this function and it will raise an index error if the comment is not there, coming close to the most literal way
could be interpreted in python
save