• 0 Posts
  • 1 Comment
Joined 1 year ago
cake
Cake day: July 17th, 2023

help-circle
  • 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