Hacker News new | ask | show | jobs
by xashor 2240 days ago

  LABEL = sys._getframe().f_lineno
  print(1)
  j(LABEL)
1 comments

Past labels are easy, but what about future labels?

  print(1)
  goto('MYLABEL')
  print(2)
  label('MYLABEL')
  print(3)
Or better yet...

  for x in range(10):
      for y in range(10):
          if x == 5 and y == 5:
              print(x, y)
              goto('MULTIBREAK')
  
  label('MULTIBREAK')