• Bob and Alice

    From Stefan Ram@21:1/5 to All on Fri Feb 24 08:54:32 2023
    "I don't get it. What's the difference between 'f_lineno' and
    'lineno'?", Alice said.

    Bob said, "You don't need documentation for this, you can just
    try it out. In Python, you can always just try everything out."

    Bob wrote,

    import inspect as _inspect

    print( _inspect.currentframe().f_lineno )
    print( _inspect.getframeinfo( _inspect.currentframe() ).lineno )

    , which printed,

    3
    4

    . "There you got it! 'lineno' is 'f_lineno' plus 1.", Bob said.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)