Skip to content

Instantly share code, notes, and snippets.

@mariogeiger
Created May 7, 2021 13:20
Show Gist options
  • Save mariogeiger/dbc726e1aff33ff99d0105d760a863e6 to your computer and use it in GitHub Desktop.
Save mariogeiger/dbc726e1aff33ff99d0105d760a863e6 to your computer and use it in GitHub Desktop.
import inspect
class LINE:
def __repr__(self):
return str(inspect.stack()[1].lineno)
__line__ = LINE()
print(__line__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment