parameters: (frame)
return_statement: return lineno
docstring: Get the line number from a frame object, allowing for optimization.
docstring_summary: Get the line number from a frame object, allowing for optimization.
docstring_tokens: Get the line number from a frame object allowing for optimization .
function: def getlineno(frame):
      """Get the line number from a frame object, allowing for optimization."""
      # Written by Marc-Andr Lemburg; revised by Jim Hugunin and Fredrik Lundh.
      lineno = frame.f_lineno
      code = frame.f_code
      if hasattr(code, 'co_lnotab'):
          table = code.co_lnotab
          lineno = code.co_firstlineno
          addr = 0
          for i in range(0, len(table), 2):
              addr = addr + ord(table[i])
              if addr > frame.f_lasti: break
              lineno = lineno + ord(table[i + 1])
      return lineno
function_tokens: def getlineno ( frame ) : # Written by Marc-Andr Lemburg; revised by Jim Hugunin and Fredrik Lundh. lineno = frame . f_lineno code = frame . f_code if hasattr ( code , 'co_lnotab' ) : table = code . co_lnotab lineno = code . co_firstlineno addr = 0 for i in range ( 0 , len ( table ) , 2 ) : addr = addr + ord ( table [ i ] ) if addr > frame . f_lasti : break lineno = lineno + ord ( table [ i + 1 ] ) return lineno