Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4856d01

Browse files
committed
Removed a lot of unnecessary comment markers which cause unexplained
numbers to appear in the HTML version of the manual.
1 parent 8e2c945 commit 4856d01

1 file changed

Lines changed: 83 additions & 84 deletions

File tree

Doc/ref/ref3.tex

Lines changed: 83 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@ \section{Objects, values and types\label{objects}}
4949
Note that the use of the implementation's tracing or debugging
5050
facilities may keep objects alive that would normally be collectable.
5151
Also note that catching an exception with a
52-
`\code{try}...\code{except}' statement may keep objects alive.
52+
`\keyword{try}...\keyword{except}' statement may keep objects alive.
5353

5454
Some objects contain references to ``external'' resources such as open
5555
files or windows. It is understood that these resources are freed
5656
when the object is garbage-collected, but since garbage collection is
5757
not guaranteed to happen, such objects also provide an explicit way to
5858
release the external resource, usually a \method{close()} method.
5959
Programs are strongly recommended to explicitly close such
60-
objects.
61-
The `\code{try}...\code{finally}' statement provides a convenient way
62-
to do this.
60+
objects. The `\keyword{try}...\keyword{finally}' statement provides
61+
a convenient way to do this.
6362

6463
Some objects contain references to other objects; these are called
6564
\emph{containers}. Examples of containers are tuples, lists and
@@ -110,7 +109,7 @@ \section{The standard type hierarchy\label{types}}
110109
\index{attribute}
111110
\indexii{special}{attribute}
112111
\indexiii{generic}{special}{attribute}
113-
\withsubitem{(built-in object attribute)}{%
112+
\withsubitem{(built-in object attribute)}{
114113
\ttindex{__methods__}
115114
\ttindex{__members__}}
116115

@@ -231,7 +230,7 @@ \section{The standard type hierarchy\label{types}}
231230
Sequences are distinguished according to their mutability:
232231

233232
\begin{description}
234-
%
233+
235234
\item[Immutable sequences]
236235
An object of an immutable sequence type cannot change once it is
237236
created. (If the object contains references to other objects,
@@ -388,12 +387,12 @@ \section{The standard type hierarchy\label{types}}
388387
defined. Additional information about a function's definition can be
389388
retrieved from its code object; see the description of internal types
390389
below.
391-
\withsubitem{(function attribute)}{%
392-
\ttindex{func_doc}%
393-
\ttindex{__doc__}%
394-
\ttindex{__name__}%
395-
\ttindex{func_defaults}%
396-
\ttindex{func_code}%
390+
\withsubitem{(function attribute)}{
391+
\ttindex{func_doc}
392+
\ttindex{__doc__}
393+
\ttindex{__name__}
394+
\ttindex{func_defaults}
395+
\ttindex{func_code}
397396
\ttindex{func_globals}}
398397
\indexii{global}{namespace}
399398

@@ -411,8 +410,8 @@ \section{The standard type hierarchy\label{types}}
411410
\member{__doc__} is the method's documentation (same as
412411
\code{im_func.__doc__}); \member{__name__} is the method name (same as
413412
\code{im_func.__name__}).
414-
\withsubitem{(method attribute)}{%
415-
\ttindex{im_func}%
413+
\withsubitem{(method attribute)}{
414+
\ttindex{im_func}
416415
\ttindex{im_self}}
417416

418417
User-defined method objects are created in two ways: when getting an
@@ -430,9 +429,9 @@ \section{The standard type hierarchy\label{types}}
430429
instance, \code{x.f} yields a bound method object \code{m} where
431430
\code{m.im_class} is \code{C}, \code{m.im_func} is \method{f()}, and
432431
\code{m.im_self} is \code{x}.
433-
\withsubitem{(method attribute)}{%
434-
\ttindex{im_class}%
435-
\ttindex{im_func}%
432+
\withsubitem{(method attribute)}{
433+
\ttindex{im_class}
434+
\ttindex{im_func}
436435
\ttindex{im_self}}
437436

438437
When an unbound user-defined method object is called, the underlying
@@ -531,9 +530,9 @@ \section{The standard type hierarchy\label{types}}
531530
statically linked into the interpreter; for extension modules loaded
532531
dynamically from a shared library, it is the pathname of the shared
533532
library file.
534-
\withsubitem{(module attribute)}{%
535-
\ttindex{__name__}%
536-
\ttindex{__doc__}%
533+
\withsubitem{(module attribute)}{
534+
\ttindex{__name__}
535+
\ttindex{__doc__}
537536
\ttindex{__file__}}
538537
\indexii{module}{namespace}
539538

@@ -576,11 +575,11 @@ \section{The standard type hierarchy\label{types}}
576575
containing the base classes, in the order of their occurrence in the
577576
base class list; \member{__doc__} is the class's documentation string,
578577
or None if undefined.
579-
\withsubitem{(class attribute)}{%
580-
\ttindex{__name__}%
581-
\ttindex{__module__}%
582-
\ttindex{__dict__}%
583-
\ttindex{__bases__}%
578+
\withsubitem{(class attribute)}{
579+
\ttindex{__name__}
580+
\ttindex{__module__}
581+
\ttindex{__dict__}
582+
\ttindex{__bases__}
584583
\ttindex{__doc__}}
585584

586585
\item[Class instances]
@@ -617,8 +616,8 @@ \section{The standard type hierarchy\label{types}}
617616

618617
Special attributes: \member{__dict__} is the attribute
619618
dictionary; \member{__class__} is the instance's class.
620-
\withsubitem{(instance attribute)}{%
621-
\ttindex{__dict__}%
619+
\withsubitem{(instance attribute)}{
620+
\ttindex{__dict__}
622621
\ttindex{__class__}}
623622

624623
\item[Files]
@@ -637,9 +636,9 @@ \section{The standard type hierarchy\label{types}}
637636
\bifuncindex{open}
638637
\withsubitem{(in module os)}{\ttindex{popen()}}
639638
\withsubitem{(socket method)}{\ttindex{makefile()}}
640-
\withsubitem{(in module sys)}{%
641-
\ttindex{stdin}%
642-
\ttindex{stdout}%
639+
\withsubitem{(in module sys)}{
640+
\ttindex{stdin}
641+
\ttindex{stdout}
643642
\ttindex{stderr}}
644643
\ttindex{sys.stdin}
645644
\ttindex{sys.stdout}
@@ -684,18 +683,18 @@ \section{The standard type hierarchy\label{types}}
684683
the interpreter); \member{co_stacksize} is the required stack size
685684
(including local variables); \member{co_flags} is an integer encoding
686685
a number of flags for the interpreter.
687-
\withsubitem{(code object attribute)}{%
688-
\ttindex{co_argcount}%
689-
\ttindex{co_code}%
690-
\ttindex{co_consts}%
691-
\ttindex{co_filename}%
692-
\ttindex{co_firstlineno}%
693-
\ttindex{co_flags}%
694-
\ttindex{co_lnotab}%
695-
\ttindex{co_name}%
696-
\ttindex{co_names}%
697-
\ttindex{co_nlocals}%
698-
\ttindex{co_stacksize}%
686+
\withsubitem{(code object attribute)}{
687+
\ttindex{co_argcount}
688+
\ttindex{co_code}
689+
\ttindex{co_consts}
690+
\ttindex{co_filename}
691+
\ttindex{co_firstlineno}
692+
\ttindex{co_flags}
693+
\ttindex{co_lnotab}
694+
\ttindex{co_name}
695+
\ttindex{co_names}
696+
\ttindex{co_nlocals}
697+
\ttindex{co_stacksize}
699698
\ttindex{co_varnames}}
700699

701700
The following flag bits are defined for \member{co_flags}: bit 2 is set
@@ -724,25 +723,25 @@ \section{The standard type hierarchy\label{types}}
724723
\member{f_lineno} gives the line number and \member{f_lasti} gives the
725724
precise instruction (this is an index into the bytecode string of
726725
the code object).
727-
\withsubitem{(frame attribute)}{%
728-
\ttindex{f_back}%
729-
\ttindex{f_code}%
730-
\ttindex{f_globals}%
731-
\ttindex{f_locals}%
732-
\ttindex{f_lineno}%
733-
\ttindex{f_lasti}%
734-
\ttindex{f_builtins}%
726+
\withsubitem{(frame attribute)}{
727+
\ttindex{f_back}
728+
\ttindex{f_code}
729+
\ttindex{f_globals}
730+
\ttindex{f_locals}
731+
\ttindex{f_lineno}
732+
\ttindex{f_lasti}
733+
\ttindex{f_builtins}
735734
\ttindex{f_restricted}}
736735

737736
Special writable attributes: \member{f_trace}, if not \code{None}, is a
738737
function called at the start of each source code line (this is used by
739738
the debugger); \member{f_exc_type}, \member{f_exc_value},
740739
\member{f_exc_traceback} represent the most recent exception caught in
741740
this frame.
742-
\withsubitem{(frame attribute)}{%
743-
\ttindex{f_trace}%
744-
\ttindex{f_exc_type}%
745-
\ttindex{f_exc_value}%
741+
\withsubitem{(frame attribute)}{
742+
\ttindex{f_trace}
743+
\ttindex{f_exc_type}
744+
\ttindex{f_exc_value}
746745
\ttindex{f_exc_traceback}}
747746

748747
\item[Traceback objects] \label{traceback}
@@ -765,9 +764,9 @@ \section{The standard type hierarchy\label{types}}
765764
\indexii{stack}{trace}
766765
\indexii{exception}{handler}
767766
\indexii{execution}{stack}
768-
\withsubitem{(in module sys)}{%
769-
\ttindex{exc_info}%
770-
\ttindex{exc_traceback}%
767+
\withsubitem{(in module sys)}{
768+
\ttindex{exc_info}
769+
\ttindex{exc_traceback}
771770
\ttindex{last_traceback}}
772771
\ttindex{sys.exc_info}
773772
\ttindex{sys.exc_traceback}
@@ -782,10 +781,10 @@ \section{The standard type hierarchy\label{types}}
782781
traceback may differ from the line number of its frame object if the
783782
exception occurred in a \keyword{try} statement with no matching
784783
except clause or with a finally clause.
785-
\withsubitem{(traceback attribute)}{%
786-
\ttindex{tb_next}%
787-
\ttindex{tb_frame}%
788-
\ttindex{tb_lineno}%
784+
\withsubitem{(traceback attribute)}{
785+
\ttindex{tb_next}
786+
\ttindex{tb_frame}
787+
\ttindex{tb_lineno}
789788
\ttindex{tb_lasti}}
790789
\stindex{try}
791790

@@ -799,9 +798,9 @@ \section{The standard type hierarchy\label{types}}
799798
Special read-only attributes: \member{start} is the lowerbound;
800799
\member{stop} is the upperbound; \member{step} is the step value; each is
801800
\code{None} if omitted. These attributes can have any type.
802-
\withsubitem{(slice object attribute)}{%
803-
\ttindex{start}%
804-
\ttindex{stop}%
801+
\withsubitem{(slice object attribute)}{
802+
\ttindex{start}
803+
\ttindex{stop}
805804
\ttindex{step}}
806805

807806
\end{description} % Internal types
@@ -1026,27 +1025,27 @@ \subsection{Emulating sequence and mapping types\label{sequence-types}}
10261025
\method{__add__()}, \method{__radd__()}, \method{__mul__()} and
10271026
\method{__rmul__()} described below; they should not define
10281027
\method{__coerce__()} or other numerical operators.
1029-
\withsubitem{(mapping object method)}{%
1030-
\ttindex{keys()}%
1031-
\ttindex{values()}%
1032-
\ttindex{items()}%
1033-
\ttindex{has_key()}%
1034-
\ttindex{get()}%
1035-
\ttindex{clear()}%
1036-
\ttindex{copy()}%
1028+
\withsubitem{(mapping object method)}{
1029+
\ttindex{keys()}
1030+
\ttindex{values()}
1031+
\ttindex{items()}
1032+
\ttindex{has_key()}
1033+
\ttindex{get()}
1034+
\ttindex{clear()}
1035+
\ttindex{copy()}
10371036
\ttindex{update()}}
1038-
\withsubitem{(sequence object method)}{%
1039-
\ttindex{append()}%
1040-
\ttindex{count()}%
1041-
\ttindex{index()}%
1042-
\ttindex{insert()}%
1043-
\ttindex{pop()}%
1044-
\ttindex{remove()}%
1045-
\ttindex{reverse()}%
1046-
\ttindex{sort()}%
1047-
\ttindex{__add__()}%
1048-
\ttindex{__radd__()}%
1049-
\ttindex{__mul__()}%
1037+
\withsubitem{(sequence object method)}{
1038+
\ttindex{append()}
1039+
\ttindex{count()}
1040+
\ttindex{index()}
1041+
\ttindex{insert()}
1042+
\ttindex{pop()}
1043+
\ttindex{remove()}
1044+
\ttindex{reverse()}
1045+
\ttindex{sort()}
1046+
\ttindex{__add__()}
1047+
\ttindex{__radd__()}
1048+
\ttindex{__mul__()}
10501049
\ttindex{__rmul__()}}
10511050
\withsubitem{(numberic object method)}{\ttindex{__coerce__()}}
10521051

0 commit comments

Comments
 (0)