Added "import string" to a couple of examples that describe string

module functions, to clarify that the import is not automatic.
Suggested by Koray Oner <Koray.Oner@Eng.Sun.COM>.
This commit is contained in:
Fred Drake 1999-09-14 18:00:49 +00:00
parent fa4eb188f4
commit 0ba58158c5
1 changed files with 2 additions and 0 deletions

View File

@ -572,6 +572,7 @@ the first line above could also have been written \samp{word = 'Help'
expressions:
\begin{verbatim}
>>> import string
>>> 'str' 'ing' # <- This is ok
'string'
>>> string.strip('str') + 'ing' # <- This is ok
@ -2387,6 +2388,7 @@ numeric string on the left with zeros. It understands about plus and
minus signs:
\begin{verbatim}
>>> import string
>>> string.zfill('12', 5)
'00012'
>>> string.zfill('-3.14', 7)