]> granicus.if.org Git - python/commitdiff
round(): Mark the second (optional) parameter as optional, since it's
authorFred Drake <fdrake@acm.org>
Mon, 24 Aug 1998 20:30:07 +0000 (20:30 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 24 Aug 1998 20:30:07 +0000 (20:30 +0000)
described that way.

setattr():  Clarify that the attribute doesn't need to exist to be set.

Doc/lib/libfuncs.tex

index 7f0012118b03328af62dd6bea01164728fe093f9..0b0a8310bda7052310bd902402fda89719145857 100644 (file)
@@ -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}