예제 #1
0
        private static MultibyteCodec GetCodec(object self, CodeContext context) {
            MultibyteCodec codec = PythonOps.GetBoundAttr(context, self, "codec") as MultibyteCodec;
            if (codec == null) {
                throw PythonOps.TypeError("codec is unexpected type");
            }

            return codec;
        }
예제 #2
0
 public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")]string errors) {
     _codec = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }
예제 #3
0
 public MultibyteIncrementalEncoder(CodeContext context) {
     _codec = GetCodec(this, context);
 }
예제 #4
0
 public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")] string errors)
 {
     _codec  = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }
예제 #5
0
 public MultibyteIncrementalEncoder(CodeContext context)
 {
     _codec = GetCodec(this, context);
 }
예제 #6
0
 public MultibyteStreamReader(CodeContext context, object stream, string errors = "strict")
 {
     _codec  = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }