Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
695f07b2
Kaydet (Commit)
695f07b2
authored
Kas 11, 2013
tarafından
Andrew Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix some PEP8-formatting problems in the generated code
üst
77796e4f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
gencodec.py
Tools/unicode/gencodec.py
+9
-9
No files found.
Tools/unicode/gencodec.py
Dosyayı görüntüle @
695f07b2
...
@@ -290,27 +290,27 @@ import codecs
...
@@ -290,27 +290,27 @@ import codecs
class Codec(codecs.Codec):
class Codec(codecs.Codec):
def encode(self,
input,
errors='strict'):
def encode(self,
input,
errors='strict'):
return codecs.charmap_encode(input,
errors,
encoding_
%
s)
return codecs.charmap_encode(input,
errors,
encoding_
%
s)
def decode(self,
input,
errors='strict'):
def decode(self,
input,
errors='strict'):
return codecs.charmap_decode(input,
errors,
decoding_
%
s)
return codecs.charmap_decode(input,
errors,
decoding_
%
s)
'''
%
(
encodingname
,
name
,
suffix
,
suffix
)]
'''
%
(
encodingname
,
name
,
suffix
,
suffix
)]
l
.
append
(
'''
\
l
.
append
(
'''
\
class IncrementalEncoder(codecs.IncrementalEncoder):
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
def encode(self, input, final=False):
return codecs.charmap_encode(input,
self.errors,
encoding_
%
s)[0]
return codecs.charmap_encode(input,
self.errors,
encoding_
%
s)[0]
class IncrementalDecoder(codecs.IncrementalDecoder):
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False):
def decode(self, input, final=False):
return codecs.charmap_decode(input,
self.errors,
decoding_
%
s)[0]'''
%
return codecs.charmap_decode(input,
self.errors,
decoding_
%
s)[0]'''
%
(
suffix
,
suffix
))
(
suffix
,
suffix
))
l
.
append
(
'''
l
.
append
(
'''
class StreamWriter(Codec,codecs.StreamWriter):
class StreamWriter(Codec,
codecs.StreamWriter):
pass
pass
class StreamReader(Codec,codecs.StreamReader):
class StreamReader(Codec,
codecs.StreamReader):
pass
pass
### encodings module API
### encodings module API
...
@@ -343,7 +343,7 @@ def getregentry():
...
@@ -343,7 +343,7 @@ def getregentry():
if
decoding_table_code
:
if
decoding_table_code
:
l
.
append
(
'''
l
.
append
(
'''
### Encoding table
### Encoding table
encoding_table
=
codecs.charmap_build(decoding_table)
encoding_table
=
codecs.charmap_build(decoding_table)
'''
)
'''
)
else
:
else
:
l
.
append
(
'''
l
.
append
(
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment