mirror of
https://github.com/python/cpython.git
synced 2025-09-16 13:47:31 +00:00
when generating python code prefer to generate valid python code
This commit is contained in:
parent
b8b3c8e276
commit
df676c5ffd
1 changed files with 3 additions and 3 deletions
|
@ -318,15 +318,15 @@ class StreamReader(Codec,codecs.StreamReader):
|
|||
### encodings module API
|
||||
|
||||
def getregentry():
|
||||
return codecs.CodecInfo((
|
||||
name=%r,
|
||||
return codecs.CodecInfo(
|
||||
Codec().encode,
|
||||
Codec().decode,
|
||||
name=%r,
|
||||
streamwriter=StreamWriter,
|
||||
streamreader=StreamReader,
|
||||
incrementalencoder=IncrementalEncoder,
|
||||
incrementaldecoder=IncrementalDecoder,
|
||||
))
|
||||
)
|
||||
''' % encodingname.replace('_', '-'))
|
||||
|
||||
# Add decoding table or map (with preference to the table)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue