Commit 2884d6de authored by Fred Drake's avatar Fred Drake

Fix a variety of small markup nits.

parent e2ff8be7
...@@ -190,12 +190,12 @@ following glossary of common Python terms: ...@@ -190,12 +190,12 @@ following glossary of common Python terms:
\file{.pyo} files). Sometimes referred to as a ``pure module.'' \file{.pyo} files). Sometimes referred to as a ``pure module.''
\item[extension module] a module written in the low-level language of \item[extension module] a module written in the low-level language of
the Python implementation: C/C++ for Python, Java for Jython. the Python implementation: C/\Cpp{} for Python, Java for Jython.
Typically contained in a single dynamically loadable pre-compiled Typically contained in a single dynamically loadable pre-compiled
file, e.g. a shared object (\file{.so}) file for Python extensions on file, e.g. a shared object (\file{.so}) file for Python extensions on
\UNIX, a DLL (given the \file{.pyd} extension) for Python extensions \UNIX, a DLL (given the \file{.pyd} extension) for Python extensions
on Windows, or a Java class file for Jython extensions. (Note that on Windows, or a Java class file for Jython extensions. (Note that
currently, the Distutils only handles C/C++ extensions for Python.) currently, the Distutils only handles C/\Cpp{} extensions for Python.)
\item[package] a module that contains other modules; typically contained \item[package] a module that contains other modules; typically contained
in a directory in the filesystem and distinguished from other in a directory in the filesystem and distinguished from other
...@@ -471,16 +471,16 @@ source files: \file{.cc} and \file{.cpp} seem to be recognized by both ...@@ -471,16 +471,16 @@ source files: \file{.cc} and \file{.cpp} seem to be recognized by both
However, you can also include SWIG interface (\file{.i}) files in the However, you can also include SWIG interface (\file{.i}) files in the
list; the \command{build\_ext} command knows how to deal with SWIG list; the \command{build\_ext} command knows how to deal with SWIG
extensions: it will run SWIG on the interface file and compile the extensions: it will run SWIG on the interface file and compile the
resulting C/C++ file into your extension. resulting C/\Cpp{} file into your extension.
\XXX{SWIG support is rough around the edges and largely untested; \XXX{SWIG support is rough around the edges and largely untested;
especially SWIG support of C++ extensions! Explain in more detail especially SWIG support for \Cpp{} extensions! Explain in more detail
here when the interface firms up.} here when the interface firms up.}
On some platforms, you can include non-source files that are processed On some platforms, you can include non-source files that are processed
by the compiler and included in your extension. Currently, this just by the compiler and included in your extension. Currently, this just
means Windows message text (\file{.mc}) files and resource definition means Windows message text (\file{.mc}) files and resource definition
(\file{.rc}) files for Visual C++. These will be compiled to binary resource (\file{.rc}) files for Visual \Cpp. These will be compiled to binary resource
(\file{.res}) files and linked into the executable. (\file{.res}) files and linked into the executable.
......
...@@ -699,7 +699,7 @@ Type ``help'', ``copyright'', ``credits'' or ``license'' for more information. ...@@ -699,7 +699,7 @@ Type ``help'', ``copyright'', ``credits'' or ``license'' for more information.
'/usr/local/lib/python2.3/lib-tk', '/usr/local/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/lib-tk', '/usr/local/lib/python2.3/lib-dynload',
'/usr/local/lib/python2.3/site-packages'] '/usr/local/lib/python2.3/site-packages']
>>> >>>
\end{verbatim} \end{verbatim} % $ <-- bow to font-lock
The null string in \code{sys.path} represents the current working The null string in \code{sys.path} represents the current working
directory. directory.
...@@ -1002,7 +1002,7 @@ Compiler flags can also be supplied through setting the ...@@ -1002,7 +1002,7 @@ Compiler flags can also be supplied through setting the
\subsection{Using non-Microsoft compilers on Windows \label{non-ms-compilers}} \subsection{Using non-Microsoft compilers on Windows \label{non-ms-compilers}}
\sectionauthor{Rene Liebscher}{R.Liebscher@gmx.de} \sectionauthor{Rene Liebscher}{R.Liebscher@gmx.de}
\subsubsection{Borland C++} \subsubsection{Borland \Cpp}
This subsection describes the necessary steps to use Distutils with the This subsection describes the necessary steps to use Distutils with the
Borland \Cpp{} compiler version 5.5. Borland \Cpp{} compiler version 5.5.
...@@ -1056,7 +1056,7 @@ for Distutils (see section~\ref{config-files}.) ...@@ -1056,7 +1056,7 @@ for Distutils (see section~\ref{config-files}.)
\seetitle[http://www.cyberus.ca/\~{}g_will/pyExtenDL.shtml] \seetitle[http://www.cyberus.ca/\~{}g_will/pyExtenDL.shtml]
{Creating Python Extensions Using Borland's Free Compiler} {Creating Python Extensions Using Borland's Free Compiler}
{Document describing how to use Borland's free command-line C++ {Document describing how to use Borland's free command-line \Cpp
compiler to build Python.} compiler to build Python.}
\end{seealso} \end{seealso}
......
...@@ -141,7 +141,7 @@ class C: ...@@ -141,7 +141,7 @@ class C:
If a class method is called for a derived class, the derived class If a class method is called for a derived class, the derived class
object is passed as the implied first argument. object is passed as the implied first argument.
Class methods are different than C++ or Java static methods. Class methods are different than \Cpp{} or Java static methods.
If you want those, see \function{staticmethod()} in this section. If you want those, see \function{staticmethod()} in this section.
\versionadded{2.2} \versionadded{2.2}
\end{funcdesc} \end{funcdesc}
...@@ -446,10 +446,10 @@ class C: ...@@ -446,10 +446,10 @@ class C:
function is assumed, that is, all elements of \var{list} that are false function is assumed, that is, all elements of \var{list} that are false
(zero or empty) are removed. (zero or empty) are removed.
Note that \code{filter(function, list)} equals Note that \code{filter(function, \var{list})} is equivalent to
\code{[item for item in list if function(item)]} if function is not \code{[item for item in \var{list} if function(item)]} if function is
\code{None} and \code{[item for item in list if item]} if function is not \code{None} and \code{[item for item in \var{list} if item]} if
None. function is \code{None}.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{float}{\optional{x}} \begin{funcdesc}{float}{\optional{x}}
...@@ -890,7 +890,7 @@ class C(object): ...@@ -890,7 +890,7 @@ class C(object):
\begin{funcdesc}{slice}{\optional{start,} stop\optional{, step}} \begin{funcdesc}{slice}{\optional{start,} stop\optional{, step}}
Return a slice object representing the set of indices specified by Return a slice object representing the set of indices specified by
\code{range(\var{start}, \var{stop}, \var{step})}. The \var{start} \code{range(\var{start}, \var{stop}, \var{step})}. The \var{start}
and \var{step} arguments default to None. Slice objects have and \var{step} arguments default to \code{None}. Slice objects have
read-only data attributes \member{start}, \member{stop} and read-only data attributes \member{start}, \member{stop} and
\member{step} which merely return the argument values (or their \member{step} which merely return the argument values (or their
default). They have no other explicit functionality; however they default). They have no other explicit functionality; however they
...@@ -928,7 +928,8 @@ class C: ...@@ -928,7 +928,8 @@ class C:
The \var{sequence}'s items are normally numbers, and are not allowed The \var{sequence}'s items are normally numbers, and are not allowed
to be strings. The fast, correct way to concatenate sequence of to be strings. The fast, correct way to concatenate sequence of
strings is by calling \code{''.join(\var{sequence})}. strings is by calling \code{''.join(\var{sequence})}.
Note that \code{sum(range(n), m)} equals \code{reduce(operator.add, range(n), m)} Note that \code{sum(range(\var{n}), \var{m})} is equivalent to
\code{reduce(operator.add, range(\var{n}), \var{m})}
\versionadded{2.3} \versionadded{2.3}
\end{funcdesc} \end{funcdesc}
......
...@@ -446,7 +446,7 @@ his \program{po-utils} package at ...@@ -446,7 +446,7 @@ his \program{po-utils} package at
scans all your Python source code looking for the strings you scans all your Python source code looking for the strings you
previously marked as translatable. It is similar to the GNU previously marked as translatable. It is similar to the GNU
\program{gettext} program except that it understands all the \program{gettext} program except that it understands all the
intricacies of Python source code, but knows nothing about C or C++ intricacies of Python source code, but knows nothing about C or \Cpp
source code. You don't need GNU \code{gettext} unless you're also source code. You don't need GNU \code{gettext} unless you're also
going to be translating C code (such as C extension modules). going to be translating C code (such as C extension modules).
......
\section{\module{msvcrt} -- \section{\module{msvcrt} --
Useful routines from the MS VC++ runtime} Useful routines from the MS V\Cpp{} runtime}
\declaremodule{builtin}{msvcrt} \declaremodule{builtin}{msvcrt}
\platform{Windows} \platform{Windows}
\modulesynopsis{Miscellaneous useful routines from the MS VC++ runtime.} \modulesynopsis{Miscellaneous useful routines from the MS V\Cpp{} runtime.}
\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
......
...@@ -421,7 +421,7 @@ variable on the left-hand side. ...@@ -421,7 +421,7 @@ variable on the left-hand side.
Augmented assignment operators were first introduced in the C Augmented assignment operators were first introduced in the C
programming language, and most C-derived languages, such as programming language, and most C-derived languages, such as
\program{awk}, C++, Java, Perl, and PHP also support them. The augmented \program{awk}, \Cpp, Java, Perl, and PHP also support them. The augmented
assignment patch was implemented by Thomas Wouters. assignment patch was implemented by Thomas Wouters.
% ====================================================================== % ======================================================================
...@@ -633,7 +633,7 @@ exception would simply be silently swallowed. ...@@ -633,7 +633,7 @@ exception would simply be silently swallowed.
Work has been done on porting Python to 64-bit Windows on the Itanium Work has been done on porting Python to 64-bit Windows on the Itanium
processor, mostly by Trent Mick of ActiveState. (Confusingly, processor, mostly by Trent Mick of ActiveState. (Confusingly,
\code{sys.platform} is still \code{'win32'} on Win64 because it seems \code{sys.platform} is still \code{'win32'} on Win64 because it seems
that for ease of porting, MS Visual C++ treats code as 32 bit on Itanium.) that for ease of porting, MS Visual \Cpp{} treats code as 32 bit on Itanium.)
PythonWin also supports Windows CE; see the Python CE page at PythonWin also supports Windows CE; see the Python CE page at
\url{http://starship.python.net/crew/mhammond/ce/} for more \url{http://starship.python.net/crew/mhammond/ce/} for more
information. information.
......
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