Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78e057a

Browse files
committed
Clarify the version information for the unicode() built-in.
Closes SF bug #575272.
1 parent 1969817 commit 78e057a

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Doc/lib/libfuncs.tex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -873,13 +873,16 @@ \section{Built-in Functions \label{built-in-funcs}}
873873
behaviour of \code{str()} except that it returns Unicode strings
874874
instead of 8-bit strings. More precisely, if \var{object} is an
875875
Unicode string or subclass it will return a Unicode string without
876-
any additional decoding applied. For objects which provide a
877-
\code{__unicode__} method, it will call this method without
878-
arguments to create a Unicode string. For all other objects, the
879-
8-bit string version or representation is requested and then
880-
converted to a Unicode string using the codec for the default
881-
encoding in \code{'strict'} mode.
876+
any additional decoding applied.
877+
878+
For objects which provide a \method{__unicode__()} method, it will
879+
call this method without arguments to create a Unicode string. For
880+
all other objects, the 8-bit string version or representation is
881+
requested and then converted to a Unicode string using the codec for
882+
the default encoding in \code{'strict'} mode.
883+
882884
\versionadded{2.0}
885+
\versionchanged[Support for \method{__unicode__()} added]{2.2}
883886
\end{funcdesc}
884887

885888
\begin{funcdesc}{vars}{\optional{object}}

0 commit comments

Comments
 (0)