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
aff85e2d
Kaydet (Commit)
aff85e2d
authored
Eyl 20, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #1541463: optimize performance of cgi.FieldStorage operations.
üst
5d242eef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
cgi.py
Lib/cgi.py
+6
-10
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/cgi.py
Dosyayı görüntüle @
aff85e2d
...
@@ -607,31 +607,27 @@ class FieldStorage:
...
@@ -607,31 +607,27 @@ class FieldStorage:
"""Dictionary style keys() method."""
"""Dictionary style keys() method."""
if
self
.
list
is
None
:
if
self
.
list
is
None
:
raise
TypeError
,
"not indexable"
raise
TypeError
,
"not indexable"
keys
=
[]
return
list
(
set
(
item
.
name
for
item
in
self
.
list
))
for
item
in
self
.
list
:
if
item
.
name
not
in
keys
:
keys
.
append
(
item
.
name
)
return
keys
def
has_key
(
self
,
key
):
def
has_key
(
self
,
key
):
"""Dictionary style has_key() method."""
"""Dictionary style has_key() method."""
if
self
.
list
is
None
:
if
self
.
list
is
None
:
raise
TypeError
,
"not indexable"
raise
TypeError
,
"not indexable"
for
item
in
self
.
list
:
return
any
(
item
.
name
==
key
for
item
in
self
.
list
)
if
item
.
name
==
key
:
return
True
return
False
def
__contains__
(
self
,
key
):
def
__contains__
(
self
,
key
):
"""Dictionary style __contains__ method."""
"""Dictionary style __contains__ method."""
if
self
.
list
is
None
:
if
self
.
list
is
None
:
raise
TypeError
,
"not indexable"
raise
TypeError
,
"not indexable"
for
item
in
self
.
list
:
return
any
(
item
.
name
==
key
for
item
in
self
.
list
)
if
item
.
name
==
key
:
return
True
return
False
def
__len__
(
self
):
def
__len__
(
self
):
"""Dictionary style len(x) support."""
"""Dictionary style len(x) support."""
return
len
(
self
.
keys
())
return
len
(
self
.
keys
())
def
__nonzero__
(
self
):
return
bool
(
self
.
list
)
def
read_urlencoded
(
self
):
def
read_urlencoded
(
self
):
"""Internal: read data in query string format."""
"""Internal: read data in query string format."""
qs
=
self
.
fp
.
read
(
self
.
length
)
qs
=
self
.
fp
.
read
(
self
.
length
)
...
...
Misc/NEWS
Dosyayı görüntüle @
aff85e2d
...
@@ -260,6 +260,8 @@ Core and builtins
...
@@ -260,6 +260,8 @@ Core and builtins
Library
Library
-------
-------
- Patch #1541463: optimize performance of cgi.FieldStorage operations.
- Decimal is fully updated to the latest Decimal Specification (v1.66).
- Decimal is fully updated to the latest Decimal Specification (v1.66).
- Bug #1153: repr.repr() now doesn'
t
require
set
and
dictionary
items
- Bug #1153: repr.repr() now doesn'
t
require
set
and
dictionary
items
...
...
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