@@ -42,7 +42,7 @@ \section{Built-in Functions}
4242
4343\begin {funcdesc }{compile}{string\, filename\, kind}
4444 Compile the \var {string} into a code object. Code objects can be
45- executed by a \code {exec() } statement or evaluated by a call to
45+ executed by an \code {exec} statement or evaluated by a call to
4646 \code {eval()}. The \var {filename} argument should
4747 give the file from which the code was read; pass e.g. \code {'<string>'}
4848 if it wasn't read from a file. The \var {kind} argument specifies
@@ -56,7 +56,7 @@ \section{Built-in Functions}
5656 object and a string. The string must be the name
5757 of one of the object's attributes. The function deletes
5858 the named attribute, provided the object allows it. For example,
59- \code {setattr (\var {x}, '\var{foobar}' )} is equivalent to
59+ \code {delattr (\var {x}, '\var{foobar}' )} is equivalent to
6060 \code {del \var {x}.\var {foobar}}.
6161\end {funcdesc }
6262
@@ -106,13 +106,15 @@ \section{Built-in Functions}
106106\end {verbatim }\ecode
107107
108108 This function can also be used to execute arbitrary code objects
109- (e.g. created by \code {compile()}). In this case pass a code
109+ (e.g.\ created by \code {compile()}). In this case pass a code
110110 object instead of a string. The code object must have been compiled
111111 passing \code {'eval'} to the \var {kind} argument.
112112
113- Note : dynamic execution of statements is supported by the
113+ Hints : dynamic execution of statements is supported by the
114114 \code {exec} statement. Execution of statements from a file is
115- supported by the \code {execfile()} function.
115+ supported by the \code {execfile()} function. The \code {vars()}
116+ function returns the current local dictionary, which may be useful
117+ to pass around for use by \code {eval()} or \code {execfile()}.
116118
117119\end {funcdesc }
118120
@@ -138,7 +140,7 @@ \section{Built-in Functions}
138140\var {function} returns true. If \var {list} is a string or a tuple,
139141the result also has that type; otherwise it is always a list. If
140142\var {function} is \code {None}, the identity function is assumed,
141- i.e. all elements of \var {list} that are false (zero or empty) are
143+ i.e.\ all elements of \var {list} that are false (zero or empty) are
142144removed.
143145\end {funcdesc }
144146
@@ -268,7 +270,7 @@ \section{Built-in Functions}
268270\begin {funcdesc }{pow}{x\, y\optional {\, z}}
269271 Return \var {x} to the power \var {y}; if \var {z} is present, return
270272 \var {x} to the power \var {y}, modulo \var {z} (computed more
271- efficiently that \code {pow(\var {x}, \var {y}) \% \var {z}}).
273+ efficiently than \code {pow(\var {x}, \var {y}) \% \var {z}}).
272274 The arguments must have
273275 numeric types. With mixed operand types, the rules for binary
274276 arithmetic operators apply. The effective operand type is also the
@@ -378,7 +380,7 @@ \section{Built-in Functions}
378380\begin {funcdesc }{str}{object}
379381Return a string containing a nicely printable representation of an
380382object. For strings, this returns the string itself. The difference
381- with \code {repr(\var {object}} is that \code {str(\var {object}} does not
383+ with \code {repr(\var {object}) } is that \code {str(\var {object}) } does not
382384always attempt to return a string that is acceptable to \code {eval()};
383385its goal is to return a printable string.
384386\end {funcdesc }
@@ -412,7 +414,7 @@ \section{Built-in Functions}
412414corresponding symbol table are undefined.%
413415\footnote {In the current implementation, local variable bindings
414416cannot normally be affected this way, but variables retrieved from
415- other scopes can be. This may change.}
417+ other scopes (e.g. modules) can be. This may change.}
416418\end {funcdesc }
417419
418420\begin {funcdesc }{xrange}{\optional {start\, } end\optional {\, step}}
0 commit comments