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
6fa0c5a4
Kaydet (Commit)
6fa0c5a4
authored
Eyl 14, 2005
tarafından
Gustavo Niemeyer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.
üst
0c55f294
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
sre_parse.py
Lib/sre_parse.py
+3
-0
test_re.py
Lib/test/test_re.py
+3
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Lib/sre_parse.py
Dosyayı görüntüle @
6fa0c5a4
...
@@ -485,6 +485,9 @@ def _parse(source, state):
...
@@ -485,6 +485,9 @@ def _parse(source, state):
elif
this
==
"+"
:
elif
this
==
"+"
:
min
,
max
=
1
,
MAXREPEAT
min
,
max
=
1
,
MAXREPEAT
elif
this
==
"{"
:
elif
this
==
"{"
:
if
source
.
next
==
"}"
:
subpatternappend
((
LITERAL
,
ord
(
this
)))
continue
here
=
source
.
tell
()
here
=
source
.
tell
()
min
,
max
=
0
,
MAXREPEAT
min
,
max
=
0
,
MAXREPEAT
lo
=
hi
=
""
lo
=
hi
=
""
...
...
Lib/test/test_re.py
Dosyayı görüntüle @
6fa0c5a4
...
@@ -297,6 +297,9 @@ class ReTests(unittest.TestCase):
...
@@ -297,6 +297,9 @@ class ReTests(unittest.TestCase):
self
.
assertNotEqual
(
re
.
match
(
"^x{1,4}?$"
,
"xxx"
),
None
)
self
.
assertNotEqual
(
re
.
match
(
"^x{1,4}?$"
,
"xxx"
),
None
)
self
.
assertNotEqual
(
re
.
match
(
"^x{3,4}?$"
,
"xxx"
),
None
)
self
.
assertNotEqual
(
re
.
match
(
"^x{3,4}?$"
,
"xxx"
),
None
)
self
.
assertEqual
(
re
.
match
(
"^x{}$"
,
"xxx"
),
None
)
self
.
assertNotEqual
(
re
.
match
(
"^x{}$"
,
"x{}"
),
None
)
def
test_getattr
(
self
):
def
test_getattr
(
self
):
self
.
assertEqual
(
re
.
match
(
"(a)"
,
"a"
)
.
pos
,
0
)
self
.
assertEqual
(
re
.
match
(
"(a)"
,
"a"
)
.
pos
,
0
)
self
.
assertEqual
(
re
.
match
(
"(a)"
,
"a"
)
.
endpos
,
1
)
self
.
assertEqual
(
re
.
match
(
"(a)"
,
"a"
)
.
endpos
,
1
)
...
...
Misc/NEWS
Dosyayı görüntüle @
6fa0c5a4
...
@@ -443,6 +443,10 @@ Library
...
@@ -443,6 +443,10 @@ Library
from the input stream, so that the output is a byte string in the correct
from the input stream, so that the output is a byte string in the correct
encoding instead of a unicode string.
encoding instead of a unicode string.
- Bug #1202493: Fixing SRE parser to handle '
{}
' as perl does, rather than
considering it exactly like a '
*
'.
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