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
cf672f15
Kaydet (Commit)
cf672f15
authored
Eki 18, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add test for local assigned to only in a nested list comp
üst
961dfe0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
test_scope
Lib/test/output/test_scope
+1
-0
test_scope.py
Lib/test/test_scope.py
+18
-0
No files found.
Lib/test/output/test_scope
Dosyayı görüntüle @
cf672f15
...
...
@@ -20,3 +20,4 @@ test_scope
19. var is bound and free in class
20. interaction with trace function
20. eval with free variables
21. list comprehension with local variables
Lib/test/test_scope.py
Dosyayı görüntüle @
cf672f15
...
...
@@ -485,3 +485,21 @@ else:
print
"eval() should have failed, because code contained free vars"
warnings
.
resetwarnings
()
print
"21. list comprehension with local variables"
try
:
print
bad
except
NameError
:
pass
else
:
print
"bad should not be defined"
def
x
():
[
bad
for
s
in
'a b'
for
bad
in
s
.
split
()]
x
()
try
:
print
bad
except
NameError
:
pass
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