[Python-checkins] r46961 - python/trunk/Doc/api/concrete.tex
georg.brandl
python-checkins at python.org
Wed Jun 14 18:46:44 CEST 2006
Author: georg.brandl
Date: Wed Jun 14 18:46:43 2006
New Revision: 46961
Modified:
python/trunk/Doc/api/concrete.tex
Log:
Bug #805015: doc error in PyUnicode_FromEncodedObject.
Modified: python/trunk/Doc/api/concrete.tex
==============================================================================
--- python/trunk/Doc/api/concrete.tex (original)
+++ python/trunk/Doc/api/concrete.tex Wed Jun 14 18:46:43 2006
@@ -1001,21 +1001,14 @@
const char *errors}
Coerce an encoded object \var{obj} to an Unicode object and return a
reference with incremented refcount.
+
+ String and other char buffer compatible objects are decoded
+ according to the given encoding and using the error handling
+ defined by errors. Both can be \NULL{} to have the interface
+ use the default values (see the next section for details).
- Coercion is done in the following way:
-
-\begin{enumerate}
-\item Unicode objects are passed back as-is with incremented
- refcount. \note{These cannot be decoded; passing a non-\NULL{}
- value for encoding will result in a \exception{TypeError}.}
-
-\item String and other char buffer compatible objects are decoded
- according to the given encoding and using the error handling
- defined by errors. Both can be \NULL{} to have the interface
- use the default values (see the next section for details).
-
-\item All other objects cause an exception.
-\end{enumerate}
+ All other objects, including Unicode objects, cause a
+ \exception{TypeError} to be set.
The API returns \NULL{} if there was an error. The caller is
responsible for decref'ing the returned objects.
More information about the Python-checkins
mailing list