A few more short fixes.

This commit is contained in:
Georg Brandl 2007-08-11 12:11:02 +00:00
parent fc357f4f81
commit bbf900dd4a
21 changed files with 44 additions and 52 deletions

View File

@ -64,7 +64,7 @@ objects.
.. versionadded:: 2.4
The following functions are for runtime dynamic embedding of Python:
:cfunc:`Py_IncRef(PyObject \*o)`, :cfunc:`Py_DecRef(PyObject \*o)`. They are
``Py_IncRef(PyObject \*o)``, `Py_DecRef(PyObject \*o)``. They are
simply exported function versions of :cfunc:`Py_XINCREF` and
:cfunc:`Py_XDECREF`, respectively.

View File

@ -58,11 +58,11 @@ prints a simple piece of HTML::
print "Hello, world!"
.. _using-the-cgi-module:
Using the cgi module
--------------------
.. _using the cgi module:
Begin by writing ``import cgi``. Do not use ``from cgi import *`` --- the
module defines all sorts of names for its own use or for backward compatibility
that you don't want in your namespace.
@ -262,11 +262,11 @@ these and would be inconvenienced when they disappeared from a next version of
this module, drop me a note.
.. _functions-in-cgi-module:
Functions
---------
.. _functions in cgi module:
These are useful if you want more control, or if you want to employ some of the
algorithms implemented in this module in other circumstances.

View File

@ -42,11 +42,11 @@ event handling is available, though, so you can mix FORMS with pure GL windows.
:cfunc:`foreground` and to the FORMS routine :cfunc:`fl_init`.
.. _fl-functions:
Functions Defined in Module :mod:`fl`
-------------------------------------
.. _fl functions:
Module :mod:`fl` defines the following functions. For more information about
what they do, see the description of the equivalent C function in the FORMS
documentation:

View File

@ -429,7 +429,7 @@ affected by the values passed to the :meth:`__new__` method for the type (as it
is for tuples and strings). Instances of a new-style type :class:`C` are
created using ::
obj = C.__new__(C, \*args)
obj = C.__new__(C, *args)
where *args* is the result of calling :meth:`__getnewargs__` on the original

View File

@ -41,11 +41,11 @@ suggestions for improvements to: jar@netscape.com. I won't promise *any*
support. ...but I'd appreciate the feedback.
.. _profiler-introduction:
Introduction to the profilers
=============================
.. _profiler introduction:
.. index::
single: deterministic profiling
single: profiling, deterministic
@ -243,11 +243,11 @@ reading and examining profile dumps. It has a simple line-oriented interface
(implemented using :mod:`cmd`) and interactive help.
.. _deterministic-profiling:
What Is Deterministic Profiling?
================================
.. _deterministic profiling:
:dfn:`Deterministic profiling` is meant to reflect the fact that all *function
call*, *function return*, and *exception* events are monitored, and precise
timings are made for the intervals between these events (during which time the
@ -623,11 +623,11 @@ If you have a choice, you are better off choosing a smaller constant, and then
your results will "less often" show up as negative in profile statistics.
.. _profiler-extensions:
Extensions --- Deriving Better Profilers
========================================
.. _profiler extensions:
The :class:`Profile` class of both modules, :mod:`profile` and :mod:`cProfile`,
were written so that derived classes could be developed to extend the profiler.
The details are not described here, as doing this successfully requires an

View File

@ -406,11 +406,11 @@ argument regardless of whether a newline precedes it.
re.compile("^a", re.M).search("ba", 1) # fails; no preceding \n
.. _contents-of-module-re:
Module Contents
---------------
.. _contents of module re:
The module defines several functions, constants, and an exception. Some of the
functions are simplified versions of the full featured methods for compiled
regular expressions. Most non-trivial applications always use the compiled

View File

@ -128,11 +128,11 @@ The :mod:`signal` module defines the following functions:
descriptions in the :mod:`inspect` module).
.. _signal-example:
Example
-------
.. _signal example:
Here is a minimal example program. It uses the :func:`alarm` function to limit
the time spent waiting to open a file; this is useful if the file is for a
serial device that may not be turned on, which would normally cause the

View File

@ -363,7 +363,7 @@ Notes:
Bit-string Operations on Integer Types
--------------------------------------
.. _bit-string operations:
.. _bit-string-operations:
Plain and long integer types support additional operations that make sense only
for bit-strings. Negative numbers are treated as their 2's complement value
@ -2214,8 +2214,6 @@ Modules built into the interpreter are written like this: ``<module 'sys'
Classes and Class Instances
---------------------------
.. _classes and instances:
See :ref:`objects` and :ref:`class` for these.

View File

@ -433,11 +433,11 @@ overloaded to provide the appropriate behavior:
environment.
.. _urllib-examples:
Examples
--------
.. _urllib examples:
Here is an example session that uses the ``GET`` method to retrieve a URL
containing parameters::

View File

@ -323,7 +323,7 @@ Identifiers (also referred to as *names*) are described by the following lexical
definitions:
.. productionlist::
identifier: (`letter`|"_") (`letter` | `digit` | "_")\*
identifier: (`letter`|"_") (`letter` | `digit` | "_")*
letter: `lowercase` | `uppercase`
lowercase: "a"..."z"
uppercase: "A"..."Z"

View File

@ -166,8 +166,6 @@ The script can be given an executable mode, or permission, using the
$ chmod +x myscript.py
.. % $ <-- bow to font-lock
Source Code Encoding
--------------------
@ -176,7 +174,7 @@ It is possible to use encodings different than ASCII in Python source files. The
best way to do it is to put one more special comment line right after the ``#!``
line to define the source file encoding::
# -\*- coding: encoding -\*-
# -*- coding: encoding -*-
With that declaration, all characters in the source file will be treated as

View File

@ -64,7 +64,7 @@ objects.
.. versionadded:: 2.4
The following functions are for runtime dynamic embedding of Python:
:cfunc:`Py_IncRef(PyObject \*o)`, :cfunc:`Py_DecRef(PyObject \*o)`. They are
``Py_IncRef(PyObject \*o)``, `Py_DecRef(PyObject \*o)``. They are
simply exported function versions of :cfunc:`Py_XINCREF` and
:cfunc:`Py_XDECREF`, respectively.

View File

@ -58,11 +58,11 @@ prints a simple piece of HTML::
print "Hello, world!"
.. _using-the-cgi-module:
Using the cgi module
--------------------
.. _using the cgi module:
Begin by writing ``import cgi``. Do not use ``from cgi import *`` --- the
module defines all sorts of names for its own use or for backward compatibility
that you don't want in your namespace.
@ -262,11 +262,11 @@ these and would be inconvenienced when they disappeared from a next version of
this module, drop me a note.
.. _functions-in-cgi-module:
Functions
---------
.. _functions in cgi module:
These are useful if you want more control, or if you want to employ some of the
algorithms implemented in this module in other circumstances.

View File

@ -429,7 +429,7 @@ affected by the values passed to the :meth:`__new__` method for the type (as it
is for tuples and strings). Instances of a new-style type :class:`C` are
created using ::
obj = C.__new__(C, \*args)
obj = C.__new__(C, *args)
where *args* is the result of calling :meth:`__getnewargs__` on the original

View File

@ -41,11 +41,11 @@ suggestions for improvements to: jar@netscape.com. I won't promise *any*
support. ...but I'd appreciate the feedback.
.. _profiler-introduction:
Introduction to the profilers
=============================
.. _profiler introduction:
.. index::
single: deterministic profiling
single: profiling, deterministic
@ -243,11 +243,11 @@ reading and examining profile dumps. It has a simple line-oriented interface
(implemented using :mod:`cmd`) and interactive help.
.. _deterministic-profiling:
What Is Deterministic Profiling?
================================
.. _deterministic profiling:
:dfn:`Deterministic profiling` is meant to reflect the fact that all *function
call*, *function return*, and *exception* events are monitored, and precise
timings are made for the intervals between these events (during which time the
@ -623,11 +623,11 @@ If you have a choice, you are better off choosing a smaller constant, and then
your results will "less often" show up as negative in profile statistics.
.. _profiler-extensions:
Extensions --- Deriving Better Profilers
========================================
.. _profiler extensions:
The :class:`Profile` class of both modules, :mod:`profile` and :mod:`cProfile`,
were written so that derived classes could be developed to extend the profiler.
The details are not described here, as doing this successfully requires an

View File

@ -406,11 +406,11 @@ argument regardless of whether a newline precedes it.
re.compile("^a", re.M).search("ba", 1) # fails; no preceding \n
.. _contents-of-module-re:
Module Contents
---------------
.. _contents of module re:
The module defines several functions, constants, and an exception. Some of the
functions are simplified versions of the full featured methods for compiled
regular expressions. Most non-trivial applications always use the compiled

View File

@ -128,11 +128,11 @@ The :mod:`signal` module defines the following functions:
descriptions in the :mod:`inspect` module).
.. _signal-example:
Example
-------
.. _signal example:
Here is a minimal example program. It uses the :func:`alarm` function to limit
the time spent waiting to open a file; this is useful if the file is for a
serial device that may not be turned on, which would normally cause the

View File

@ -356,7 +356,7 @@ Notes:
Bit-string Operations on Integer Types
--------------------------------------
.. _bit-string operations:
.. _bit-string-operations:
Plain and long integer types support additional operations that make sense only
for bit-strings. Negative numbers are treated as their 2's complement value
@ -2185,8 +2185,6 @@ Modules built into the interpreter are written like this: ``<module 'sys'
Classes and Class Instances
---------------------------
.. _classes and instances:
See :ref:`objects` and :ref:`class` for these.

View File

@ -433,11 +433,11 @@ overloaded to provide the appropriate behavior:
environment.
.. _urllib-examples:
Examples
--------
.. _urllib examples:
Here is an example session that uses the ``GET`` method to retrieve a URL
containing parameters::

View File

@ -323,7 +323,7 @@ Identifiers (also referred to as *names*) are described by the following lexical
definitions:
.. productionlist::
identifier: (`letter`|"_") (`letter` | `digit` | "_")\*
identifier: (`letter`|"_") (`letter` | `digit` | "_")*
letter: `lowercase` | `uppercase`
lowercase: "a"..."z"
uppercase: "A"..."Z"

View File

@ -166,8 +166,6 @@ The script can be given an executable mode, or permission, using the
$ chmod +x myscript.py
.. % $ <-- bow to font-lock
Source Code Encoding
--------------------
@ -176,7 +174,7 @@ It is possible to use encodings different than ASCII in Python source files. The
best way to do it is to put one more special comment line right after the ``#!``
line to define the source file encoding::
# -\*- coding: encoding -\*-
# -*- coding: encoding -*-
With that declaration, all characters in the source file will be treated as