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
4ce5f3f2
Kaydet (Commit)
4ce5f3f2
authored
May 04, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
improve idioms (closes #20642)
Patch by Claudiu Popa.
üst
98baa141
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
copy.py
Lib/copy.py
+3
-5
No files found.
Lib/copy.py
Dosyayı görüntüle @
4ce5f3f2
...
...
@@ -221,17 +221,15 @@ def _deepcopy_list(x, memo):
d
[
list
]
=
_deepcopy_list
def
_deepcopy_tuple
(
x
,
memo
):
y
=
[]
for
a
in
x
:
y
.
append
(
deepcopy
(
a
,
memo
))
y
=
[
deepcopy
(
a
,
memo
)
for
a
in
x
]
# We're not going to put the tuple in the memo, but it's still important we
# check for it, in case the tuple contains recursive mutable structures.
try
:
return
memo
[
id
(
x
)]
except
KeyError
:
pass
for
i
in
range
(
len
(
x
)
):
if
x
[
i
]
is
not
y
[
i
]
:
for
k
,
j
in
zip
(
x
,
y
):
if
k
is
not
j
:
y
=
tuple
(
y
)
break
else
:
...
...
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