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
b5d0a215
Kaydet (Commit)
b5d0a215
authored
Kas 05, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25554: Got rid of circular references in regular expression parsing.
üst
60a1d3cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
sre_parse.py
Lib/sre_parse.py
+6
-6
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/sre_parse.py
Dosyayı görüntüle @
b5d0a215
...
@@ -70,14 +70,14 @@ class Pattern:
...
@@ -70,14 +70,14 @@ class Pattern:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
flags
=
0
self
.
flags
=
0
self
.
groupdict
=
{}
self
.
groupdict
=
{}
self
.
subpattern
s
=
[
None
]
# group 0
self
.
groupwidth
s
=
[
None
]
# group 0
self
.
lookbehindgroups
=
None
self
.
lookbehindgroups
=
None
@property
@property
def
groups
(
self
):
def
groups
(
self
):
return
len
(
self
.
subpattern
s
)
return
len
(
self
.
groupwidth
s
)
def
opengroup
(
self
,
name
=
None
):
def
opengroup
(
self
,
name
=
None
):
gid
=
self
.
groups
gid
=
self
.
groups
self
.
subpattern
s
.
append
(
None
)
self
.
groupwidth
s
.
append
(
None
)
if
self
.
groups
>
MAXGROUPS
:
if
self
.
groups
>
MAXGROUPS
:
raise
error
(
"too many groups"
)
raise
error
(
"too many groups"
)
if
name
is
not
None
:
if
name
is
not
None
:
...
@@ -88,9 +88,9 @@ class Pattern:
...
@@ -88,9 +88,9 @@ class Pattern:
self
.
groupdict
[
name
]
=
gid
self
.
groupdict
[
name
]
=
gid
return
gid
return
gid
def
closegroup
(
self
,
gid
,
p
):
def
closegroup
(
self
,
gid
,
p
):
self
.
subpatterns
[
gid
]
=
p
self
.
groupwidths
[
gid
]
=
p
.
getwidth
()
def
checkgroup
(
self
,
gid
):
def
checkgroup
(
self
,
gid
):
return
gid
<
self
.
groups
and
self
.
subpattern
s
[
gid
]
is
not
None
return
gid
<
self
.
groups
and
self
.
groupwidth
s
[
gid
]
is
not
None
def
checklookbehindgroup
(
self
,
gid
,
source
):
def
checklookbehindgroup
(
self
,
gid
,
source
):
if
self
.
lookbehindgroups
is
not
None
:
if
self
.
lookbehindgroups
is
not
None
:
...
@@ -195,7 +195,7 @@ class SubPattern:
...
@@ -195,7 +195,7 @@ class SubPattern:
lo
=
lo
+
1
lo
=
lo
+
1
hi
=
hi
+
1
hi
=
hi
+
1
elif
op
is
GROUPREF
:
elif
op
is
GROUPREF
:
i
,
j
=
self
.
pattern
.
subpatterns
[
av
]
.
getwidth
()
i
,
j
=
self
.
pattern
.
groupwidths
[
av
]
lo
=
lo
+
i
lo
=
lo
+
i
hi
=
hi
+
j
hi
=
hi
+
j
elif
op
is
GROUPREF_EXISTS
:
elif
op
is
GROUPREF_EXISTS
:
...
...
Misc/NEWS
Dosyayı görüntüle @
b5d0a215
...
@@ -54,6 +54,8 @@ Core and Builtins
...
@@ -54,6 +54,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
25554
:
Got
rid
of
circular
references
in
regular
expression
parsing
.
-
Issue
#
25510
:
fileinput
.
FileInput
.
readline
()
now
returns
b
''
instead
of
''
-
Issue
#
25510
:
fileinput
.
FileInput
.
readline
()
now
returns
b
''
instead
of
''
at
the
end
if
the
FileInput
was
opened
with
binary
mode
.
at
the
end
if
the
FileInput
was
opened
with
binary
mode
.
Patch
by
Ryosuke
Ito
.
Patch
by
Ryosuke
Ito
.
...
...
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