diff options
author | Georg Brandl <georg@python.org> | 2006-06-14 16:46:43 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-14 16:46:43 (GMT) |
commit | 69f6168b766d3fb8fbd0dec8cbeaf97ce564e2c4 (patch) | |
tree | 6454e471dcb365827a7ead6082a5f695e6fe5eca /Doc/api | |
parent | 7259d7bfd6af4c0a111fa0905da510673907ff72 (diff) | |
download | cpython-69f6168b766d3fb8fbd0dec8cbeaf97ce564e2c4.zip cpython-69f6168b766d3fb8fbd0dec8cbeaf97ce564e2c4.tar.gz cpython-69f6168b766d3fb8fbd0dec8cbeaf97ce564e2c4.tar.bz2 |
Bug #805015: doc error in PyUnicode_FromEncodedObject.
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/concrete.tex | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index 40b178f..f1fbccb 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -1001,21 +1001,14 @@ use these APIs: const char *errors} Coerce an encoded object \var{obj} to an Unicode object and return a reference with incremented refcount. - - 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} + + 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). + + 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. |