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
1c0f1f97
Kaydet (Commit)
1c0f1f97
authored
Mar 25, 2004
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Defer compilation of regular expressions until first use.
üst
85309512
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
util.py
Lib/distutils/util.py
+7
-3
No files found.
Lib/distutils/util.py
Dosyayı görüntüle @
1c0f1f97
...
@@ -209,9 +209,12 @@ def grok_environment_error (exc, prefix="error: "):
...
@@ -209,9 +209,12 @@ def grok_environment_error (exc, prefix="error: "):
# Needed by 'split_quoted()'
# Needed by 'split_quoted()'
_wordchars_re
=
re
.
compile
(
r'[^\\\'\"
%
s ]*'
%
string
.
whitespace
)
_wordchars_re
=
_squote_re
=
_dquote_re
=
None
_squote_re
=
re
.
compile
(
r"'(?:[^'\\]|\\.)*'"
)
def
_init_regex
():
_dquote_re
=
re
.
compile
(
r'"(?:[^"\\]|\\.)*"'
)
global
_wordchars_re
,
_squote_re
,
_dquote_re
_wordchars_re
=
re
.
compile
(
r'[^\\\'\"
%
s ]*'
%
string
.
whitespace
)
_squote_re
=
re
.
compile
(
r"'(?:[^'\\]|\\.)*'"
)
_dquote_re
=
re
.
compile
(
r'"(?:[^"\\]|\\.)*"'
)
def
split_quoted
(
s
):
def
split_quoted
(
s
):
"""Split a string up according to Unix shell-like rules for quotes and
"""Split a string up according to Unix shell-like rules for quotes and
...
@@ -227,6 +230,7 @@ def split_quoted (s):
...
@@ -227,6 +230,7 @@ def split_quoted (s):
# This is a nice algorithm for splitting up a single string, since it
# This is a nice algorithm for splitting up a single string, since it
# doesn't require character-by-character examination. It was a little
# doesn't require character-by-character examination. It was a little
# bit of a brain-bender to get it working right, though...
# bit of a brain-bender to get it working right, though...
if
_wordchars_re
is
None
:
_init_regex
()
s
=
string
.
strip
(
s
)
s
=
string
.
strip
(
s
)
words
=
[]
words
=
[]
...
...
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