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
1b5f58d1
Commit
1b5f58d1
authored
Jul 25, 2014
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #21990: Cleanup unnecessary inner class definition in saxutils.
parent
2ce9ddd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
Lib/xml/sax/saxutils.py
Lib/xml/sax/saxutils.py
+8
-5
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/xml/sax/saxutils.py
View file @
1b5f58d1
...
...
@@ -98,14 +98,17 @@ def _gettextwriter(out, encoding):
except
AttributeError
:
pass
# wrap a binary writer with TextIOWrapper
class
UnbufferedTextIOWrapper
(
io
.
TextIOWrapper
):
def
write
(
self
,
s
):
super
(
UnbufferedTextIOWrapper
,
self
).
write
(
s
)
self
.
flush
()
return
UnbufferedTextIOWrapper
(
buffer
,
encoding
=
encoding
,
return
_UnbufferedTextIOWrapper
(
buffer
,
encoding
=
encoding
,
errors
=
'xmlcharrefreplace'
,
newline
=
'
\
n
'
)
class
_UnbufferedTextIOWrapper
(
io
.
TextIOWrapper
):
def
write
(
self
,
s
):
super
(
_UnbufferedTextIOWrapper
,
self
).
write
(
s
)
self
.
flush
()
class
XMLGenerator
(
handler
.
ContentHandler
):
def
__init__
(
self
,
out
=
None
,
encoding
=
"iso-8859-1"
):
...
...
Misc/NEWS
View file @
1b5f58d1
...
...
@@ -17,6 +17,9 @@ Library
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK.
- Issue #21990: Clean-up unnecessary and slow inner class definition in
saxutils (Contributed by Alex Gaynor).
- Issue #1730136: Fix the comparison between a tkFont.Font and an object of
another kind.
...
...
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