title: AttributeError: 'float' object has no attribute 'co_names'
body: <p>simple inspect script for pyc file
  there is a problem with <strong>co_name</strong> function
  the script is work well until the <strong>marshal</strong> module is <strong>load</strong> then fall.</p>
  <pre><code>magic: 160d0d0a
  mod_time: 1493965574
  source_size: 231
  
  code:
  Traceback (most recent call last):
    File &quot;/home/ubuntu/Downloads/book-resources-master/chapter4/code-exec-eg/python/inspect.py&quot;, line 24, in &lt;module&gt;
      inspect_code(code)
    File &quot;/home/ubuntu/Downloads/book-resources-master/chapter4/code-exec-eg/python/inspect.py&quot;, line 8, in inspect_code
      print('{}{}(line:{})'.format(indent, code.co_names, code.co_firstlineno))
  AttributeError: 'float' object has no attribute 'co_names'
  </code></pre>
  <p>if anyone can help !
  thanks</p>
  <pre><code>import marshal
  import types
  
  def to_long(s):
      return s[0] + (s[1] &lt;&lt; 8) + (s[2] &lt;&lt; 16) + (s[3] &lt;&lt; 24)
  
  def inspect_code(code, indent='    '):
      print('{}{}(line:{})'.format(indent, code.co_names, code.co_firstlineno))
      for c in code.co_consts:
          if isinstance(c, types.CodeType):
              inspect_code(c, indent + '    ')
  
  f = open('__pycache__/add.cpython-39.pyc', 'rb')
  
  magic = f.read(4)
  print('magic: {}'.format(magic.hex()))
  mod_time = to_long(f.read(4))
  print('mod_time: {}'.format(mod_time))
  source_size = to_long(f.read(4))
  print('source_size: {}'.format(source_size))
  
  print('\ncode:')
  code = marshal.load(f)
  inspect_code(code)
  
  f.close()
  
  import dis
  dis.disassemble(code)
  </code></pre>