[Python-checkins] python/dist/src/Doc/tut glossary.tex,1.3,1.4

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat Sep 27 16:19:04 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1:/tmp/cvs-serv13652

Modified Files:
	glossary.tex 
Log Message:
* Fix markup.
* Fix entry order:
  -  >>> before ...
  - __slots__ in the S section (like __future__ is in the F section)

Need to test the repaired(?) link to Guido's webpage.

Still needs to have the module reference links made relative to
the module directory instead of the tut directory.  That will
require Fred's magic touch.



Index: glossary.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** glossary.tex	27 Sep 2003 18:59:43 -0000	1.3
--- glossary.tex	27 Sep 2003 20:19:02 -0000	1.4
***************
*** 6,13 ****
  \begin{description}
  
- \index{...}
- \item[\code{.\code{.}.}]
- The typical Python prompt of the interactive shell when entering code
- for an indented code block.
  
  \index{>>>}
--- 6,9 ----
***************
*** 16,31 ****
  code examples that can be tried right away in the interpreter.
  
! \index{__slots__}
! \item[__slots__]
! A declaration inside a \emph{new-style class} that saves memory by
! pre-declaring space for instance attributes and eliminating instance
! dictionaries.  Though popular, the technique is somewhat tricky to get
! right and is best reserved for rare cases where there are large
! numbers of instances in a memory critical application.
  
  \index{BDFL}
  \item[BDFL]
  Benevolent Dictator For Life, a.k.a. \ulink{Guido van
! Rossum}{http://www.python.org/~guido/}, Python's creator.
  
  \index{byte code}
--- 12,24 ----
  code examples that can be tried right away in the interpreter.
  
! \index{...}
! \item[\code{.\code{.}.}]
! The typical Python prompt of the interactive shell when entering code
! for an indented code block.
  
  \index{BDFL}
  \item[BDFL]
  Benevolent Dictator For Life, a.k.a. \ulink{Guido van
! Rossum}{http://www.python.org/\textasciitilde{}guido/}, Python's creator.
  
  \index{byte code}
***************
*** 35,40 ****
  files so that executing the same file is faster the second time
  (compilation from source to byte code can be saved).  This
! \emph{intermediate language} is said to run on a \emph{virtual
! machine} that calls the subroutines corresponding to each bytecode.
  
  \index{classic class}
--- 28,33 ----
  files so that executing the same file is faster the second time
  (compilation from source to byte code can be saved).  This
! ``intermediate language'' is said to run on a ``virtual
! machine'' that calls the subroutines corresponding to each bytecode.
  
  \index{classic class}
***************
*** 48,53 ****
  {}\code{int(3.15)} coerces the floating point number to the integer,
  {}\code{3}.  Most mathematical operations have rules for coercing
! their arguments to a common type.  For instance, adding \code{3 +
! 4.5}, causes the integer \code{3} to be coerced to be a float
  {}\code{3.0} before adding to \code{4.5} resulting in the float
  {}\code{7.5}.
--- 41,46 ----
  {}\code{int(3.15)} coerces the floating point number to the integer,
  {}\code{3}.  Most mathematical operations have rules for coercing
! their arguments to a common type.  For instance, adding \code{3+4.5},
! causes the integer \code{3} to be coerced to be a float
  {}\code{3.0} before adding to \code{4.5} resulting in the float
  {}\code{7.5}.
***************
*** 86,91 ****
  A pseudo module which programmers can use to enable new language
  features which are not compatible with the current interpreter.  For
! example, the expression \code{11 / 4} currently evaluates to \code{2}.
! If the module in which it is executed had enabled emph{true division}
  by executing:
  
--- 79,84 ----
  A pseudo module which programmers can use to enable new language
  features which are not compatible with the current interpreter.  For
! example, the expression \code{11/4} currently evaluates to \code{2}.
! If the module in which it is executed had enabled \emph{true division}
  by executing:
  
***************
*** 94,98 ****
  \end{verbatim}
  
! the expression \code{11 / 4} would evaluate to \code{2.75}.  By
  actually importing the \refmodule[future]{__future__} module and
  evaluating its variables, you can see when a new feature was first
--- 87,91 ----
  \end{verbatim}
  
! the expression \code{11/4} would evaluate to \code{2.75}.  By
  actually importing the \refmodule[future]{__future__} module and
  evaluating its variables, you can see when a new feature was first
***************
*** 128,132 ****
  multi-threaded, at the expense of some parallelism on multi-processor
  machines.  Efforts have been made in the past to create a
! "free-threaded" interpreter (one which locks shared data at a much
  finer granularity), but performance suffered in the common
  single-processor case.
--- 121,125 ----
  multi-threaded, at the expense of some parallelism on multi-processor
  machines.  Efforts have been made in the past to create a
! ``free-threaded'' interpreter (one which locks shared data at a much
  finer granularity), but performance suffered in the common
  single-processor case.
***************
*** 151,155 ****
  \item[integer division]
  Mathematical division discarding any remainder.  For example, the
! expression \code{11 / 4} currently evaluates to \code{2} in contrast
  to the \code{2.75} returned by float division.  Also called
  {}\emph{floor division}.  When dividing two integers the outcome will
--- 144,148 ----
  \item[integer division]
  Mathematical division discarding any remainder.  For example, the
! expression \code{11/4} currently evaluates to \code{2} in contrast
  to the \code{2.75} returned by float division.  Also called
  {}\emph{floor division}.  When dividing two integers the outcome will
***************
*** 181,185 ****
  \item[iterable]
  A container object capable of returning its members one at a time.
! Examples of iterables include all sequence types (such as\class{list},
  {}\class{str}, and \class{tuple}) and some non-sequence types like
  {}\class{dict} and \class{file} and objects of any classes you define
--- 174,178 ----
  \item[iterable]
  A container object capable of returning its members one at a time.
! Examples of iterables include all sequence types (such as \class{list},
  {}\class{str}, and \class{tuple}) and some non-sequence types like
  {}\class{dict} and \class{file} and objects of any classes you define
***************
*** 191,195 ****
  iterator is good for one pass over the set of values.  When using
  iterables, it is usually not necessary to call \function{iter()} or
! deal with iterator objects yourself---the \code{for} statement does
  that automatically for you, creating a temporary unnamed variable to
  hold the iterator for the duration of the loop.  See also
--- 184,188 ----
  iterator is good for one pass over the set of values.  When using
  iterables, it is usually not necessary to call \function{iter()} or
! deal with iterator objects yourself.  The \code{for} statement does
  that automatically for you, creating a temporary unnamed variable to
  hold the iterator for the duration of the loop.  See also
***************
*** 282,286 ****
  built-in types like \class{list} and \class{dict}.  Only new-style
  classes can use Python's newer, versatile features like
! {}\var{__slots__}, descriptors, properties,
  \method{__getattribute__()}, class methods, and static methods.
  
--- 275,279 ----
  built-in types like \class{list} and \class{dict}.  Only new-style
  classes can use Python's newer, versatile features like
! {}\method{__slots__}, descriptors, properties,
  \method{__getattribute__()}, class methods, and static methods.
  
***************
*** 290,293 ****
--- 283,294 ----
  telepathic interface.
  
+ \index{__slots__}
+ \item[__slots__]
+ A declaration inside a \emph{new-style class} that saves memory by
+ pre-declaring space for instance attributes and eliminating instance
+ dictionaries.  Though popular, the technique is somewhat tricky to get
+ right and is best reserved for rare cases where there are large
+ numbers of instances in a memory critical application.
+ 
  \index{sequence}
  \item[sequence]
***************
*** 305,309 ****
  Listing of Python design principles and philosophies that are helpful
  in understanding and using the language.  The listing can be found by
! typing \code{import this} at the interactive prompt.
  
  \end{description}
--- 306,310 ----
  Listing of Python design principles and philosophies that are helpful
  in understanding and using the language.  The listing can be found by
! typing ``\code{import this}'' at the interactive prompt.
  
  \end{description}





More information about the Python-checkins mailing list