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
5a6deb4c
Kaydet (Commit)
5a6deb4c
authored
Haz 28, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove string.maketrans
üst
41a57506
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
string.py
Lib/string.py
+0
-22
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/string.py
Dosyayı görüntüle @
5a6deb4c
...
@@ -40,28 +40,6 @@ def capwords(s, sep=None):
...
@@ -40,28 +40,6 @@ def capwords(s, sep=None):
return
(
sep
or
' '
)
.
join
([
x
.
capitalize
()
for
x
in
s
.
split
(
sep
)])
return
(
sep
or
' '
)
.
join
([
x
.
capitalize
()
for
x
in
s
.
split
(
sep
)])
# Construct a translation map for bytes.translate
def
maketrans
(
frm
:
bytes
,
to
:
bytes
)
->
bytes
:
"""maketrans(frm, to) -> bytes
Return a translation table (a bytes object of length 256)
suitable for use in bytes.translate where each byte in frm is
mapped to the byte at the same position in to.
The strings frm and to must be of the same length.
"""
import
warnings
warnings
.
warn
(
"string.maketrans is deprecated, use bytes.maketrans instead"
,
DeprecationWarning
,
2
)
if
len
(
frm
)
!=
len
(
to
):
raise
ValueError
(
"maketrans arguments must have same length"
)
if
not
(
isinstance
(
frm
,
bytes
)
and
isinstance
(
to
,
bytes
)):
raise
TypeError
(
"maketrans arguments must be bytes objects"
)
L
=
bytearray
(
range
(
256
))
for
i
,
c
in
enumerate
(
frm
):
L
[
c
]
=
to
[
i
]
return
bytes
(
L
)
####################################################################
####################################################################
import
re
as
_re
import
re
as
_re
...
...
Misc/NEWS
Dosyayı görüntüle @
5a6deb4c
...
@@ -17,6 +17,8 @@ Core and Builtins
...
@@ -17,6 +17,8 @@ Core and Builtins
Library
Library
-------
-------
- The deprecated function string.maketrans has been removed.
Build
Build
-----
-----
...
...
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