示例#1
0
 def __init__(self, source, allow_noop=False):
     if isinstance(source, unicode):
         source = source.encode('utf-8')
     if isinstance(source, bytes):
         source = BytesIO(source)
     self.read = source.read
     self.allow_noop = allow_noop
     self.dispatch = self.dispatch.copy()