summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-05-02 11:30:03 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-05-02 11:30:03 (GMT)
commita883701dff079948f1f74cbbabb4d88a63794d2b (patch)
treea39760026a221ae27acba1d11f49825fe843c502 /Doc
parent4b4a63e30a8f300e545f2c44b4c456c74718aa79 (diff)
downloadcpython-a883701dff079948f1f74cbbabb4d88a63794d2b.zip
cpython-a883701dff079948f1f74cbbabb4d88a63794d2b.tar.gz
cpython-a883701dff079948f1f74cbbabb4d88a63794d2b.tar.bz2
Provide encoding as keyword argument; soften warning paragraph about encodings
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/whatsnew25.tex13
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex
index 9d6932b..1c8dc2b 100644
--- a/Doc/whatsnew/whatsnew25.tex
+++ b/Doc/whatsnew/whatsnew25.tex
@@ -1724,14 +1724,15 @@ tree.write('output.xml')
# Encoding is UTF-8
f = open('output.xml', 'w')
-tree.write(f, 'utf-8')
+tree.write(f, encoding='utf-8')
\end{verbatim}
-(Caution: the default encoding used for output is ASCII, which isn't
-very useful for general XML work, raising an exception if there are
-any characters with values greater than 127. You should always
-specify a different encoding such as UTF-8 that can handle any Unicode
-character.)
+(Caution: the default encoding used for output is ASCII. For general
+XML work, where an element's name may contain arbitrary Unicode
+characters, ASCII isn't a very useful encoding because it will raise
+an exception if an element's name contains any characters with values
+greater than 127. Therefore, it's best to specify a different
+encoding such as UTF-8 that can handle any Unicode character.)
This section is only a partial description of the ElementTree interfaces.
Please read the package's official documentation for more details.