summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-08-24 20:30:07 (GMT)
committerFred Drake <fdrake@acm.org>1998-08-24 20:30:07 (GMT)
commit607f802886b85d0871e47d0028715068e0f509ba (patch)
treec6f9461202da07d780d1390dad9b0e33f277d728 /Doc/lib/libfuncs.tex
parentc859350fa60654855d5cefd23b8af6c4378ac009 (diff)
downloadcpython-607f802886b85d0871e47d0028715068e0f509ba.zip
cpython-607f802886b85d0871e47d0028715068e0f509ba.tar.gz
cpython-607f802886b85d0871e47d0028715068e0f509ba.tar.bz2
round(): Mark the second (optional) parameter as optional, since it's
described that way. setattr(): Clarify that the attribute doesn't need to exist to be set.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r--Doc/lib/libfuncs.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 7f00121..0b0a831 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -547,7 +547,7 @@ to return a string that would yield an object with the same value
when passed to \function{eval()}.
\end{funcdesc}
-\begin{funcdesc}{round}{x, n}
+\begin{funcdesc}{round}{x\optional{, n}}
Return the floating point value \var{x} rounded to \var{n} digits
after the decimal point. If \var{n} is omitted, it defaults to zero.
The result is a floating point number. Values are rounded to the
@@ -558,9 +558,9 @@ when passed to \function{eval()}.
\begin{funcdesc}{setattr}{object, name, value}
This is the counterpart of \function{getattr()}. The arguments are an
- object, a string and an arbitrary value. The string must be the name
- of one of the object's attributes. The function assigns the value to
- the attribute, provided the object allows it. For example,
+ object, a string and an arbitrary value. The string may name an
+ existing attribute or a new attribute. The function assigns the
+ value to the attribute, provided the object allows it. For example,
\code{setattr(\var{x}, '\var{foobar}', 123)} is equivalent to
\code{\var{x}.\var{foobar} = 123}.
\end{funcdesc}