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
e144c74e
Kaydet (Commit)
e144c74e
authored
Mar 10, 2012
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #14244: add info about capturing groups and maxsplit to the docstring of re.split().
üst
64a40949
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
re.py
Lib/re.py
+8
-3
No files found.
Lib/re.py
Dosyayı görüntüle @
e144c74e
...
...
@@ -179,14 +179,19 @@ def subn(pattern, repl, string, count=0, flags=0):
def
split
(
pattern
,
string
,
maxsplit
=
0
,
flags
=
0
):
"""Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings."""
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list."""
return
_compile
(
pattern
,
flags
)
.
split
(
string
,
maxsplit
)
def
findall
(
pattern
,
string
,
flags
=
0
):
"""Return a list of all non-overlapping matches in the string.
If one or more
groups are present in the pattern, return a
list of groups; this will be a list of tuples if the pattern
If one or more
capturing groups are present in the pattern, return
a
list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result."""
...
...
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