code: def readElement(self):
          
          pos = self.stream.tell()
  
          try:
              t = self.stream.read(1)
          except IOError:
              raise pyamf.EOStream
  
          try:
              func = self._func_cache[t]
          except KeyError:
              func = self.getTypeFunc(t)
  
              if not func:
                  raise pyamf.DecodeError("Unsupported ActionScript type %s" % (
                      hex(ord(t)),))
  
              self._func_cache[t] = func
  
          try:
              return func()
          except IOError:
              self.stream.seek(pos)
  
              raise
docs: Reads an AMF3 element from the data stream.
  
          @raise DecodeError: The ActionScript type is unsupported.
          @raise EOStream: No more data left to decode.