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
9182b45a
Kaydet (Commit)
9182b45a
authored
Agu 29, 2000
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added tests of "print >> None"
üst
093abe00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
test_grammar
Lib/test/output/test_grammar
+1
-0
test_grammar.py
Lib/test/test_grammar.py
+25
-0
No files found.
Lib/test/output/test_grammar
Dosyayı görüntüle @
9182b45a
...
...
@@ -23,6 +23,7 @@ extended print_stmt
1 2 3
1 2 3
1 1 1
hello world
del_stmt
pass_stmt
flow_stmt
...
...
Lib/test/test_grammar.py
Dosyayı görüntüle @
9182b45a
...
...
@@ -268,6 +268,31 @@ print >> sys.stdout
print
>>
sys
.
stdout
,
0
or
1
,
0
or
1
,
print
>>
sys
.
stdout
,
0
or
1
# test print >> None
class
Gulp
:
def
write
(
self
,
msg
):
pass
def
driver
():
oldstdout
=
sys
.
stdout
sys
.
stdout
=
Gulp
()
try
:
tellme
(
Gulp
())
tellme
()
finally
:
sys
.
stdout
=
oldstdout
# we should see this once
def
tellme
(
file
=
sys
.
stdout
):
print
>>
file
,
'hello world'
driver
()
# we should not see this at all
def
tellme
(
file
=
None
):
print
>>
file
,
'goodbye universe'
driver
()
# syntax errors
def
check_syntax
(
statement
):
try
:
...
...
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