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
a240cb1f
Kaydet (Commit)
a240cb1f
authored
Eyl 08, 2010
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue5416 - Revert a documentatin change made to explain replace on negative value.
Minor changes to doc: s/maxsplit/maxreplace
üst
011a82b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
string.py
Lib/string.py
+5
-6
No files found.
Lib/string.py
Dosyayı görüntüle @
a240cb1f
...
...
@@ -508,16 +508,15 @@ def capitalize(s):
return
s
.
capitalize
()
# Substring replacement (global)
def
replace
(
s
,
old
,
new
,
max
split
=-
1
):
"""replace (str, old, new[, max
split
]) -> string
def
replace
(
s
,
old
,
new
,
max
replace
=-
1
):
"""replace (str, old, new[, max
replace
]) -> string
Return a copy of string str with all occurrences of substring
old replaced by new. If the optional argument maxsplit is
given, only the first maxsplit occurrences are replaced. A
negative value of maxsplit signifies all occurances.
old replaced by new. If the optional argument maxreplace is
given, only the first maxreplace occurrences are replaced.
"""
return
s
.
replace
(
old
,
new
,
max
split
)
return
s
.
replace
(
old
,
new
,
max
replace
)
# Try importing optional built-in module "strop" -- if it exists,
...
...
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