parameters: (code)
return_statement: return ''.join(contents)
docstring: Return the signature contents of a code object.
  
      By providing direct access to the code object of the
      function, Python makes this extremely easy.  Hooray!
  
      Unfortunately, older versions of Python include line
      number indications in the compiled byte code.  Boo!
      So we remove the line number byte codes to prevent
      recompilations from moving a Python function.
docstring_summary: Return the signature contents of a code object.
docstring_tokens: Return the signature contents of a code object .
function: def _code_contents(code):
      """Return the signature contents of a code object.
  
      By providing direct access to the code object of the
      function, Python makes this extremely easy.  Hooray!
  
      Unfortunately, older versions of Python include line
      number indications in the compiled byte code.  Boo!
      So we remove the line number byte codes to prevent
      recompilations from moving a Python function.
      """
  
      contents = []
  
      # The code contents depends on the number of local variables
      # but not their actual names.
      contents.append("%s,%s" % (code.co_argcount, len(code.co_varnames)))
      contents.append(",%s,%s" % (len(code.co_cellvars), len(code.co_freevars)))
  
      # The code contents depends on any constants accessed by the
      # function. Note that we have to call _object_contents on each
      # constants because the code object of nested functions can
      # show-up among the constants.
      #
      # Note that we also always ignore the first entry of co_consts
      # which contains the function doc string. We assume that the
      # function does not access its doc string.
      contents.append(',(' + ','.join(map(_object_contents,code.co_consts[1:])) + ')')
  
      # The code contents depends on the variable names used to
      # accessed global variable, as changing the variable name changes
      # the variable actually accessed and therefore changes the
      # function result.
      contents.append(',(' + ','.join(map(_object_contents,code.co_names)) + ')')
  
  
      # The code contents depends on its actual code!!!
      contents.append(',(' + str(remove_set_lineno_codes(code.co_code)) + ')')
  
      return ''.join(contents)
function_tokens: def _code_contents ( code ) : contents = [ ] # The code contents depends on the number of local variables # but not their actual names. contents . append ( "%s,%s" % ( code . co_argcount , len ( code . co_varnames ) ) ) contents . append ( ",%s,%s" % ( len ( code . co_cellvars ) , len ( code . co_freevars ) ) ) # The code contents depends on any constants accessed by the # function. Note that we have to call _object_contents on each # constants because the code object of nested functions can # show-up among the constants. # # Note that we also always ignore the first entry of co_consts # which contains the function doc string. We assume that the # function does not access its doc string. contents . append ( ',(' + ',' . join ( map ( _object_contents , code . co_consts [ 1 : ] ) ) + ')' ) # The code contents depends on the variable names used to # accessed global variable, as changing the variable name changes # the variable actually accessed and therefore changes the # function result. contents . append ( ',(' + ',' . join ( map ( _object_contents , code . co_names ) ) + ')' ) # The code contents depends on its actual code!!! contents . append ( ',(' + str ( remove_set_lineno_codes ( code . co_code ) ) + ')' ) return '' . join ( contents )