File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -259,11 +259,13 @@ \section{Built-in Functions \label{built-in-funcs}}
259259 and is known to vary.
260260\end {funcdesc }
261261
262- \begin {funcdesc }{getattr}{object, name}
263- The arguments are an object and a string. The string must be the
264- name of one of the object's attributes. The result is the value of
265- that attribute. For example, \code {getattr(\var {x},
266- '\var{foobar}' )} is equivalent to \code {\var {x}.\var {foobar}}.
262+ \begin {funcdesc }{getattr}{object, name\optional {, default}}
263+ Return the value of the named attributed of \var {object}. \var {name}
264+ must be a string. If the string is the name of one of the object's
265+ attributes, the result is the value of that attribute. For example,
266+ \code {getattr(x, 'foobar' )} is equivalent to \code {x.foobar}. If the
267+ named attribute does not exist, \var {default} is returned if provided,
268+ otherwise \exception {AttributeError} is raised.
267269\end {funcdesc }
268270
269271\begin {funcdesc }{globals}{}
You can’t perform that action at this time.
0 commit comments