Kaydet (Commit) df676c5f authored tarafından Jack Diederich's avatar Jack Diederich

when generating python code prefer to generate valid python code

üst b8b3c8e2
...@@ -318,15 +318,15 @@ class StreamReader(Codec,codecs.StreamReader): ...@@ -318,15 +318,15 @@ class StreamReader(Codec,codecs.StreamReader):
### encodings module API ### encodings module API
def getregentry(): def getregentry():
return codecs.CodecInfo(( return codecs.CodecInfo(
name=%r,
Codec().encode, Codec().encode,
Codec().decode, Codec().decode,
name=%r,
streamwriter=StreamWriter, streamwriter=StreamWriter,
streamreader=StreamReader, streamreader=StreamReader,
incrementalencoder=IncrementalEncoder, incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder, incrementaldecoder=IncrementalDecoder,
)) )
''' % encodingname.replace('_', '-')) ''' % encodingname.replace('_', '-'))
# Add decoding table or map (with preference to the table) # Add decoding table or map (with preference to the table)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment