parameters: (self, size)
return_statement: return result
docstring: Read the first 'size' bytes in packet and advance cursor past them.
docstring_summary: Read the first 'size' bytes in packet and advance cursor past them.
docstring_tokens: Read the first size bytes in packet and advance cursor past them .
function: def read(self, size):
          """Read the first 'size' bytes in packet and advance cursor past them."""
          result = self._data[self._position:(self._position+size)]
          if len(result) != size:
              error = ('Result length not requested length:\n'
                       'Expected=%s.  Actual=%s.  Position: %s.  Data Length: %s'
                       % (size, len(result), self._position, len(self._data)))
              if DEBUG:
                  print(error)
                  self.dump()
              raise AssertionError(error)
          self._position += size
          return result
function_tokens: def read ( self , size ) : result = self . _data [ self . _position : ( self . _position + size ) ] if len ( result ) != size : error = ( 'Result length not requested length:\n' 'Expected=%s.  Actual=%s.  Position: %s.  Data Length: %s' % ( size , len ( result ) , self . _position , len ( self . _data ) ) ) if DEBUG : print ( error ) self . dump ( ) raise AssertionError ( error ) self . _position += size return result