Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
efc92eec
Commit
efc92eec
authored
Aug 21, 2000
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP 214, Extended print Statement, has been accepted by the BDFL.
Additional test cases for the extended print form.
parent
8c0a2422
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
Lib/test/output/test_grammar
Lib/test/output/test_grammar
+4
-0
Lib/test/test_grammar.py
Lib/test/test_grammar.py
+19
-0
No files found.
Lib/test/output/test_grammar
View file @
efc92eec
...
...
@@ -19,6 +19,10 @@ print_stmt
1 2 3
1 2 3
1 1 1
extended print_stmt
1 2 3
1 2 3
1 1 1
del_stmt
pass_stmt
flow_stmt
...
...
Lib/test/test_grammar.py
View file @
efc92eec
...
...
@@ -260,6 +260,25 @@ print
print
0
or
1
,
0
or
1
,
print
0
or
1
print
'extended print_stmt'
# 'print' '>>' test ','
import
sys
print
>>
sys
.
stdout
,
1
,
2
,
3
print
>>
sys
.
stdout
,
1
,
2
,
3
,
print
>>
sys
.
stdout
print
>>
sys
.
stdout
,
0
or
1
,
0
or
1
,
print
>>
sys
.
stdout
,
0
or
1
# syntax errors
def
check_syntax
(
statement
):
try
:
compile
(
statement
,
'<string>'
,
'exec'
)
except
SyntaxError
:
pass
else
:
print
'Missing SyntaxError: "%s"'
%
statement
check_syntax
(
'print ,'
)
check_syntax
(
'print >> x,'
)
print
'del_stmt'
# 'del' exprlist
del
abc
del
x
,
y
,
(
z
,
xyz
)
...
...
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