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
4e4035b9
Commit
4e4035b9
authored
Feb 09, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Found another difference between old and new print:
old print would suppress the softspace after \t.
parent
43fc78dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Lib/test/test_pyexpat.py
Lib/test/test_pyexpat.py
+8
-8
No files found.
Lib/test/test_pyexpat.py
View file @
4e4035b9
...
...
@@ -10,25 +10,25 @@ from test.test_support import sortdict, TestFailed
class
Outputter
:
def
StartElementHandler
(
self
,
name
,
attrs
):
print
(
'Start element:
\
n
\
t
'
,
repr
(
name
),
sortdict
(
attrs
))
print
(
'Start element:
\
n
\
t
'
+
repr
(
name
),
sortdict
(
attrs
))
def
EndElementHandler
(
self
,
name
):
print
(
'End element:
\
n
\
t
'
,
repr
(
name
))
print
(
'End element:
\
n
\
t
'
+
repr
(
name
))
def
CharacterDataHandler
(
self
,
data
):
data
=
data
.
strip
()
if
data
:
print
(
'Character data:'
)
print
(
'
\
t
'
,
repr
(
data
))
print
(
'
\
t
'
+
repr
(
data
))
def
ProcessingInstructionHandler
(
self
,
target
,
data
):
print
(
'PI:
\
n
\
t
'
,
repr
(
target
),
repr
(
data
))
print
(
'PI:
\
n
\
t
'
+
repr
(
target
),
repr
(
data
))
def
StartNamespaceDeclHandler
(
self
,
prefix
,
uri
):
print
(
'NS decl:
\
n
\
t
'
,
repr
(
prefix
),
repr
(
uri
))
print
(
'NS decl:
\
n
\
t
'
+
repr
(
prefix
),
repr
(
uri
))
def
EndNamespaceDeclHandler
(
self
,
prefix
):
print
(
'End of NS decl:
\
n
\
t
'
,
repr
(
prefix
))
print
(
'End of NS decl:
\
n
\
t
'
+
repr
(
prefix
))
def
StartCdataSectionHandler
(
self
):
print
(
'Start of CDATA section'
)
...
...
@@ -37,7 +37,7 @@ class Outputter:
print
(
'End of CDATA section'
)
def
CommentHandler
(
self
,
text
):
print
(
'Comment:
\
n
\
t
'
,
repr
(
text
))
print
(
'Comment:
\
n
\
t
'
+
repr
(
text
))
def
NotationDeclHandler
(
self
,
*
args
):
name
,
base
,
sysid
,
pubid
=
args
...
...
@@ -45,7 +45,7 @@ class Outputter:
def
UnparsedEntityDeclHandler
(
self
,
*
args
):
entityName
,
base
,
systemId
,
publicId
,
notationName
=
args
print
(
'Unparsed entity decl:
\
n
\
t
'
,
args
)
print
(
'Unparsed entity decl:
\
n
\
t
'
+
str
(
args
)
)
def
NotStandaloneHandler
(
self
,
userData
):
print
(
'Not standalone'
)
...
...
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