Commit 77ad8851 authored by Georg Brandl's avatar Georg Brandl

Bug #805015: doc error in PyUnicode_FromEncodedObject.

parent 855cc7a7
...@@ -1001,21 +1001,14 @@ use these APIs: ...@@ -1001,21 +1001,14 @@ use these APIs:
const char *errors} const char *errors}
Coerce an encoded object \var{obj} to an Unicode object and return a Coerce an encoded object \var{obj} to an Unicode object and return a
reference with incremented refcount. reference with incremented refcount.
Coercion is done in the following way: String and other char buffer compatible objects are decoded
according to the given encoding and using the error handling
\begin{enumerate} defined by errors. Both can be \NULL{} to have the interface
\item Unicode objects are passed back as-is with incremented use the default values (see the next section for details).
refcount. \note{These cannot be decoded; passing a non-\NULL{}
value for encoding will result in a \exception{TypeError}.} All other objects, including Unicode objects, cause a
\exception{TypeError} to be set.
\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}
The API returns \NULL{} if there was an error. The caller is The API returns \NULL{} if there was an error. The caller is
responsible for decref'ing the returned objects. responsible for decref'ing the returned objects.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment