mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Apply the second version of SF patch http://www.python.org/sf/536241
Add a method zfill to str, unicode and UserString and change Lib/string.py accordingly. This activates the zfill version in unicodeobject.c that was commented out and implements the same in stringobject.c. It also adds the test for unicode support in Lib/string.py back in and uses repr() instead() of str() (as it was before Lib/string.py 1.62)
This commit is contained in:
parent
b384c72639
commit
068325ef92
8 changed files with 83 additions and 13 deletions
|
@ -694,6 +694,12 @@ must be a string of length 256.
|
|||
Return a copy of the string converted to uppercase.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[string]{zfill}{width}
|
||||
Return the numeric string left filled with zeros in a string
|
||||
of length \var{width}. The original string is returned if
|
||||
\var{width} is less than \code{len(\var{s})}.
|
||||
\end{methoddesc}
|
||||
|
||||
|
||||
\subsubsection{String Formatting Operations \label{typesseq-strings}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue