Commit 4856d017 authored by Fred Drake's avatar Fred Drake

Removed a lot of unnecessary comment markers which cause unexplained

numbers to appear in the HTML version of the manual.
parent 8e2c9457
...@@ -49,7 +49,7 @@ references.) ...@@ -49,7 +49,7 @@ references.)
Note that the use of the implementation's tracing or debugging Note that the use of the implementation's tracing or debugging
facilities may keep objects alive that would normally be collectable. facilities may keep objects alive that would normally be collectable.
Also note that catching an exception with a Also note that catching an exception with a
`\code{try}...\code{except}' statement may keep objects alive. `\keyword{try}...\keyword{except}' statement may keep objects alive.
Some objects contain references to ``external'' resources such as open Some objects contain references to ``external'' resources such as open
files or windows. It is understood that these resources are freed files or windows. It is understood that these resources are freed
...@@ -57,9 +57,8 @@ when the object is garbage-collected, but since garbage collection is ...@@ -57,9 +57,8 @@ when the object is garbage-collected, but since garbage collection is
not guaranteed to happen, such objects also provide an explicit way to not guaranteed to happen, such objects also provide an explicit way to
release the external resource, usually a \method{close()} method. release the external resource, usually a \method{close()} method.
Programs are strongly recommended to explicitly close such Programs are strongly recommended to explicitly close such
objects. objects. The `\keyword{try}...\keyword{finally}' statement provides
The `\code{try}...\code{finally}' statement provides a convenient way a convenient way to do this.
to do this.
Some objects contain references to other objects; these are called Some objects contain references to other objects; these are called
\emph{containers}. Examples of containers are tuples, lists and \emph{containers}. Examples of containers are tuples, lists and
...@@ -110,7 +109,7 @@ object, if it has any. ...@@ -110,7 +109,7 @@ object, if it has any.
\index{attribute} \index{attribute}
\indexii{special}{attribute} \indexii{special}{attribute}
\indexiii{generic}{special}{attribute} \indexiii{generic}{special}{attribute}
\withsubitem{(built-in object attribute)}{% \withsubitem{(built-in object attribute)}{
\ttindex{__methods__} \ttindex{__methods__}
\ttindex{__members__}} \ttindex{__members__}}
...@@ -231,7 +230,7 @@ renumbered so that it starts at 0. ...@@ -231,7 +230,7 @@ renumbered so that it starts at 0.
Sequences are distinguished according to their mutability: Sequences are distinguished according to their mutability:
\begin{description} \begin{description}
%
\item[Immutable sequences] \item[Immutable sequences]
An object of an immutable sequence type cannot change once it is An object of an immutable sequence type cannot change once it is
created. (If the object contains references to other objects, created. (If the object contains references to other objects,
...@@ -388,12 +387,12 @@ defines the global namespace of the module in which the function was ...@@ -388,12 +387,12 @@ defines the global namespace of the module in which the function was
defined. Additional information about a function's definition can be defined. Additional information about a function's definition can be
retrieved from its code object; see the description of internal types retrieved from its code object; see the description of internal types
below. below.
\withsubitem{(function attribute)}{% \withsubitem{(function attribute)}{
\ttindex{func_doc}% \ttindex{func_doc}
\ttindex{__doc__}% \ttindex{__doc__}
\ttindex{__name__}% \ttindex{__name__}
\ttindex{func_defaults}% \ttindex{func_defaults}
\ttindex{func_code}% \ttindex{func_code}
\ttindex{func_globals}} \ttindex{func_globals}}
\indexii{global}{namespace} \indexii{global}{namespace}
...@@ -411,8 +410,8 @@ base class of the class of which \member{im_self} is an instance); ...@@ -411,8 +410,8 @@ base class of the class of which \member{im_self} is an instance);
\member{__doc__} is the method's documentation (same as \member{__doc__} is the method's documentation (same as
\code{im_func.__doc__}); \member{__name__} is the method name (same as \code{im_func.__doc__}); \member{__name__} is the method name (same as
\code{im_func.__name__}). \code{im_func.__name__}).
\withsubitem{(method attribute)}{% \withsubitem{(method attribute)}{
\ttindex{im_func}% \ttindex{im_func}
\ttindex{im_self}} \ttindex{im_self}}
User-defined method objects are created in two ways: when getting an User-defined method objects are created in two ways: when getting an
...@@ -430,9 +429,9 @@ function \method{f()}, \code{C.f} does not yield the function object ...@@ -430,9 +429,9 @@ function \method{f()}, \code{C.f} does not yield the function object
instance, \code{x.f} yields a bound method object \code{m} where instance, \code{x.f} yields a bound method object \code{m} where
\code{m.im_class} is \code{C}, \code{m.im_func} is \method{f()}, and \code{m.im_class} is \code{C}, \code{m.im_func} is \method{f()}, and
\code{m.im_self} is \code{x}. \code{m.im_self} is \code{x}.
\withsubitem{(method attribute)}{% \withsubitem{(method attribute)}{
\ttindex{im_class}% \ttindex{im_class}
\ttindex{im_func}% \ttindex{im_func}
\ttindex{im_self}} \ttindex{im_self}}
When an unbound user-defined method object is called, the underlying When an unbound user-defined method object is called, the underlying
...@@ -531,9 +530,9 @@ The \member{__file__} attribute is not present for C{} modules that are ...@@ -531,9 +530,9 @@ The \member{__file__} attribute is not present for C{} modules that are
statically linked into the interpreter; for extension modules loaded statically linked into the interpreter; for extension modules loaded
dynamically from a shared library, it is the pathname of the shared dynamically from a shared library, it is the pathname of the shared
library file. library file.
\withsubitem{(module attribute)}{% \withsubitem{(module attribute)}{
\ttindex{__name__}% \ttindex{__name__}
\ttindex{__doc__}% \ttindex{__doc__}
\ttindex{__file__}} \ttindex{__file__}}
\indexii{module}{namespace} \indexii{module}{namespace}
...@@ -576,11 +575,11 @@ Special attributes: \member{__name__} is the class name; ...@@ -576,11 +575,11 @@ Special attributes: \member{__name__} is the class name;
containing the base classes, in the order of their occurrence in the containing the base classes, in the order of their occurrence in the
base class list; \member{__doc__} is the class's documentation string, base class list; \member{__doc__} is the class's documentation string,
or None if undefined. or None if undefined.
\withsubitem{(class attribute)}{% \withsubitem{(class attribute)}{
\ttindex{__name__}% \ttindex{__name__}
\ttindex{__module__}% \ttindex{__module__}
\ttindex{__dict__}% \ttindex{__dict__}
\ttindex{__bases__}% \ttindex{__bases__}
\ttindex{__doc__}} \ttindex{__doc__}}
\item[Class instances] \item[Class instances]
...@@ -617,8 +616,8 @@ section \ref{specialnames}, ``Special method names.'' ...@@ -617,8 +616,8 @@ section \ref{specialnames}, ``Special method names.''
Special attributes: \member{__dict__} is the attribute Special attributes: \member{__dict__} is the attribute
dictionary; \member{__class__} is the instance's class. dictionary; \member{__class__} is the instance's class.
\withsubitem{(instance attribute)}{% \withsubitem{(instance attribute)}{
\ttindex{__dict__}% \ttindex{__dict__}
\ttindex{__class__}} \ttindex{__class__}}
\item[Files] \item[Files]
...@@ -637,9 +636,9 @@ Library Reference} for complete documentation of file objects. ...@@ -637,9 +636,9 @@ Library Reference} for complete documentation of file objects.
\bifuncindex{open} \bifuncindex{open}
\withsubitem{(in module os)}{\ttindex{popen()}} \withsubitem{(in module os)}{\ttindex{popen()}}
\withsubitem{(socket method)}{\ttindex{makefile()}} \withsubitem{(socket method)}{\ttindex{makefile()}}
\withsubitem{(in module sys)}{% \withsubitem{(in module sys)}{
\ttindex{stdin}% \ttindex{stdin}
\ttindex{stdout}% \ttindex{stdout}
\ttindex{stderr}} \ttindex{stderr}}
\ttindex{sys.stdin} \ttindex{sys.stdin}
\ttindex{sys.stdout} \ttindex{sys.stdout}
...@@ -684,18 +683,18 @@ byte code offsets to line numbers (for detais see the source code of ...@@ -684,18 +683,18 @@ byte code offsets to line numbers (for detais see the source code of
the interpreter); \member{co_stacksize} is the required stack size the interpreter); \member{co_stacksize} is the required stack size
(including local variables); \member{co_flags} is an integer encoding (including local variables); \member{co_flags} is an integer encoding
a number of flags for the interpreter. a number of flags for the interpreter.
\withsubitem{(code object attribute)}{% \withsubitem{(code object attribute)}{
\ttindex{co_argcount}% \ttindex{co_argcount}
\ttindex{co_code}% \ttindex{co_code}
\ttindex{co_consts}% \ttindex{co_consts}
\ttindex{co_filename}% \ttindex{co_filename}
\ttindex{co_firstlineno}% \ttindex{co_firstlineno}
\ttindex{co_flags}% \ttindex{co_flags}
\ttindex{co_lnotab}% \ttindex{co_lnotab}
\ttindex{co_name}% \ttindex{co_name}
\ttindex{co_names}% \ttindex{co_names}
\ttindex{co_nlocals}% \ttindex{co_nlocals}
\ttindex{co_stacksize}% \ttindex{co_stacksize}
\ttindex{co_varnames}} \ttindex{co_varnames}}
The following flag bits are defined for \member{co_flags}: bit 2 is set The following flag bits are defined for \member{co_flags}: bit 2 is set
...@@ -724,14 +723,14 @@ executing in restricted execution mode; ...@@ -724,14 +723,14 @@ executing in restricted execution mode;
\member{f_lineno} gives the line number and \member{f_lasti} gives the \member{f_lineno} gives the line number and \member{f_lasti} gives the
precise instruction (this is an index into the bytecode string of precise instruction (this is an index into the bytecode string of
the code object). the code object).
\withsubitem{(frame attribute)}{% \withsubitem{(frame attribute)}{
\ttindex{f_back}% \ttindex{f_back}
\ttindex{f_code}% \ttindex{f_code}
\ttindex{f_globals}% \ttindex{f_globals}
\ttindex{f_locals}% \ttindex{f_locals}
\ttindex{f_lineno}% \ttindex{f_lineno}
\ttindex{f_lasti}% \ttindex{f_lasti}
\ttindex{f_builtins}% \ttindex{f_builtins}
\ttindex{f_restricted}} \ttindex{f_restricted}}
Special writable attributes: \member{f_trace}, if not \code{None}, is a Special writable attributes: \member{f_trace}, if not \code{None}, is a
...@@ -739,10 +738,10 @@ function called at the start of each source code line (this is used by ...@@ -739,10 +738,10 @@ function called at the start of each source code line (this is used by
the debugger); \member{f_exc_type}, \member{f_exc_value}, the debugger); \member{f_exc_type}, \member{f_exc_value},
\member{f_exc_traceback} represent the most recent exception caught in \member{f_exc_traceback} represent the most recent exception caught in
this frame. this frame.
\withsubitem{(frame attribute)}{% \withsubitem{(frame attribute)}{
\ttindex{f_trace}% \ttindex{f_trace}
\ttindex{f_exc_type}% \ttindex{f_exc_type}
\ttindex{f_exc_value}% \ttindex{f_exc_value}
\ttindex{f_exc_traceback}} \ttindex{f_exc_traceback}}
\item[Traceback objects] \label{traceback} \item[Traceback objects] \label{traceback}
...@@ -765,9 +764,9 @@ interactive, it is also made available to the user as ...@@ -765,9 +764,9 @@ interactive, it is also made available to the user as
\indexii{stack}{trace} \indexii{stack}{trace}
\indexii{exception}{handler} \indexii{exception}{handler}
\indexii{execution}{stack} \indexii{execution}{stack}
\withsubitem{(in module sys)}{% \withsubitem{(in module sys)}{
\ttindex{exc_info}% \ttindex{exc_info}
\ttindex{exc_traceback}% \ttindex{exc_traceback}
\ttindex{last_traceback}} \ttindex{last_traceback}}
\ttindex{sys.exc_info} \ttindex{sys.exc_info}
\ttindex{sys.exc_traceback} \ttindex{sys.exc_traceback}
...@@ -782,10 +781,10 @@ precise instruction. The line number and last instruction in the ...@@ -782,10 +781,10 @@ precise instruction. The line number and last instruction in the
traceback may differ from the line number of its frame object if the traceback may differ from the line number of its frame object if the
exception occurred in a \keyword{try} statement with no matching exception occurred in a \keyword{try} statement with no matching
except clause or with a finally clause. except clause or with a finally clause.
\withsubitem{(traceback attribute)}{% \withsubitem{(traceback attribute)}{
\ttindex{tb_next}% \ttindex{tb_next}
\ttindex{tb_frame}% \ttindex{tb_frame}
\ttindex{tb_lineno}% \ttindex{tb_lineno}
\ttindex{tb_lasti}} \ttindex{tb_lasti}}
\stindex{try} \stindex{try}
...@@ -799,9 +798,9 @@ k:l]}, or \code{a[..., i:j])}. They are also created by the built-in ...@@ -799,9 +798,9 @@ k:l]}, or \code{a[..., i:j])}. They are also created by the built-in
Special read-only attributes: \member{start} is the lowerbound; Special read-only attributes: \member{start} is the lowerbound;
\member{stop} is the upperbound; \member{step} is the step value; each is \member{stop} is the upperbound; \member{step} is the step value; each is
\code{None} if omitted. These attributes can have any type. \code{None} if omitted. These attributes can have any type.
\withsubitem{(slice object attribute)}{% \withsubitem{(slice object attribute)}{
\ttindex{start}% \ttindex{start}
\ttindex{stop}% \ttindex{stop}
\ttindex{step}} \ttindex{step}}
\end{description} % Internal types \end{description} % Internal types
...@@ -1026,27 +1025,27 @@ multiplication (meaning repetition) by defining the methods ...@@ -1026,27 +1025,27 @@ multiplication (meaning repetition) by defining the methods
\method{__add__()}, \method{__radd__()}, \method{__mul__()} and \method{__add__()}, \method{__radd__()}, \method{__mul__()} and
\method{__rmul__()} described below; they should not define \method{__rmul__()} described below; they should not define
\method{__coerce__()} or other numerical operators. \method{__coerce__()} or other numerical operators.
\withsubitem{(mapping object method)}{% \withsubitem{(mapping object method)}{
\ttindex{keys()}% \ttindex{keys()}
\ttindex{values()}% \ttindex{values()}
\ttindex{items()}% \ttindex{items()}
\ttindex{has_key()}% \ttindex{has_key()}
\ttindex{get()}% \ttindex{get()}
\ttindex{clear()}% \ttindex{clear()}
\ttindex{copy()}% \ttindex{copy()}
\ttindex{update()}} \ttindex{update()}}
\withsubitem{(sequence object method)}{% \withsubitem{(sequence object method)}{
\ttindex{append()}% \ttindex{append()}
\ttindex{count()}% \ttindex{count()}
\ttindex{index()}% \ttindex{index()}
\ttindex{insert()}% \ttindex{insert()}
\ttindex{pop()}% \ttindex{pop()}
\ttindex{remove()}% \ttindex{remove()}
\ttindex{reverse()}% \ttindex{reverse()}
\ttindex{sort()}% \ttindex{sort()}
\ttindex{__add__()}% \ttindex{__add__()}
\ttindex{__radd__()}% \ttindex{__radd__()}
\ttindex{__mul__()}% \ttindex{__mul__()}
\ttindex{__rmul__()}} \ttindex{__rmul__()}}
\withsubitem{(numberic object method)}{\ttindex{__coerce__()}} \withsubitem{(numberic object method)}{\ttindex{__coerce__()}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment