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; }
public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")]string errors) { _codec = GetCodec(this, context); _stream = stream; _errors = errors; }
public MultibyteIncrementalEncoder(CodeContext context) { _codec = GetCodec(this, context); }
public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")] string errors) { _codec = GetCodec(this, context); _stream = stream; _errors = errors; }
public MultibyteStreamReader(CodeContext context, object stream, string errors = "strict") { _codec = GetCodec(this, context); _stream = stream; _errors = errors; }