[Python-3000-checkins] r57850 - in python/branches/py3k/Doc: TODO.txt c-api/newtypes.rst extending/newtypes.rst install/index.rst library/curses.rst library/exceptions.rst library/getopt.rst library/logging.rst library/new.rst library/nntplib.rst library/ossaudiodev.rst library/posix.rst library/re.rst library/stdtypes.rst library/tabnanny.rst library/tix.rst library/tkinter.rst library/undoc.rst reference/datamodel.rst tutorial/introduction.rst

georg.brandl python-3000-checkins at python.org
Fri Aug 31 19:17:51 CEST 2007


Author: georg.brandl
Date: Fri Aug 31 19:17:17 2007
New Revision: 57850

Modified:
   python/branches/py3k/Doc/TODO.txt
   python/branches/py3k/Doc/c-api/newtypes.rst
   python/branches/py3k/Doc/extending/newtypes.rst
   python/branches/py3k/Doc/install/index.rst
   python/branches/py3k/Doc/library/curses.rst
   python/branches/py3k/Doc/library/exceptions.rst
   python/branches/py3k/Doc/library/getopt.rst
   python/branches/py3k/Doc/library/logging.rst
   python/branches/py3k/Doc/library/new.rst
   python/branches/py3k/Doc/library/nntplib.rst
   python/branches/py3k/Doc/library/ossaudiodev.rst
   python/branches/py3k/Doc/library/posix.rst
   python/branches/py3k/Doc/library/re.rst
   python/branches/py3k/Doc/library/stdtypes.rst
   python/branches/py3k/Doc/library/tabnanny.rst
   python/branches/py3k/Doc/library/tix.rst
   python/branches/py3k/Doc/library/tkinter.rst
   python/branches/py3k/Doc/library/undoc.rst
   python/branches/py3k/Doc/reference/datamodel.rst
   python/branches/py3k/Doc/tutorial/introduction.rst
Log:
Address a few XXX comments, other fixes.


Modified: python/branches/py3k/Doc/TODO.txt
==============================================================================
--- python/branches/py3k/Doc/TODO.txt	(original)
+++ python/branches/py3k/Doc/TODO.txt	Fri Aug 31 19:17:17 2007
@@ -4,3 +4,4 @@
 * split very large files and add toctrees
 * finish "Documenting Python"
 * care about XXX comments
+* X-refs to statements

Modified: python/branches/py3k/Doc/c-api/newtypes.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/newtypes.rst	(original)
+++ python/branches/py3k/Doc/c-api/newtypes.rst	Fri Aug 31 19:17:17 2007
@@ -1155,7 +1155,7 @@
 
       PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);
 
-   XXX blah, blah.
+   XXX more
 
    This field is inherited by subtypes.
 
@@ -1170,7 +1170,7 @@
 
    This field is inherited by subtypes.
 
-   XXX blah, blah.
+   XXX more
 
 
 .. cmember:: long PyTypeObject.tp_dictoffset
@@ -1595,9 +1595,6 @@
 other objects, or which only store references to atomic types (such as numbers
 or strings), do not need to provide any explicit support for garbage collection.
 
-.. An example showing the use of these interfaces can be found in "Supporting the
-.. Cycle Collector (XXX not found: ../ext/example-cycle-support.html)".
-
 To create a container type, the :attr:`tp_flags` field of the type object must
 include the :const:`Py_TPFLAGS_HAVE_GC` and provide an implementation of the
 :attr:`tp_traverse` handler.  If instances of the type are mutable, a

Modified: python/branches/py3k/Doc/extending/newtypes.rst
==============================================================================
--- python/branches/py3k/Doc/extending/newtypes.rst	(original)
+++ python/branches/py3k/Doc/extending/newtypes.rst	Fri Aug 31 19:17:17 2007
@@ -232,8 +232,6 @@
 that directory and fire up Python --- you should be able to ``import noddy`` and
 play around with Noddy objects.
 
-.. % $ <-- bow to font-lock  ;-(
-
 That wasn't so hard, was it?
 
 Of course, the current Noddy type is pretty uninteresting. It has no data and

Modified: python/branches/py3k/Doc/install/index.rst
==============================================================================
--- python/branches/py3k/Doc/install/index.rst	(original)
+++ python/branches/py3k/Doc/install/index.rst	Fri Aug 31 19:17:17 2007
@@ -517,11 +517,7 @@
                            --install-scripts=python/scripts
                            --install-data=python/data
 
-or, equivalently,
-
-.. % $ % -- bow to font-lock
-
-::
+or, equivalently, ::
 
    python setup.py install --home=~/python \
                            --install-purelib=lib \
@@ -533,8 +529,6 @@
 the Distutils as it parses your command line options, just as it does when
 parsing your configuration file(s).
 
-.. % $ % -- bow to font-lock
-
 Obviously, specifying the entire installation scheme every time you install a
 new module distribution would be very tedious.  Thus, you can put these options
 into your Distutils config file (see section :ref:`inst-config-files`)::

Modified: python/branches/py3k/Doc/library/curses.rst
==============================================================================
--- python/branches/py3k/Doc/library/curses.rst	(original)
+++ python/branches/py3k/Doc/library/curses.rst	Fri Aug 31 19:17:17 2007
@@ -1170,7 +1170,6 @@
 Keys are referred to by integer constants with names starting with  ``KEY_``.
 The exact keycaps available are system dependent.
 
-.. % XXX this table is far too large!
 .. % XXX should this table be alphabetized?
 
 +-------------------+--------------------------------------------+

Modified: python/branches/py3k/Doc/library/exceptions.rst
==============================================================================
--- python/branches/py3k/Doc/library/exceptions.rst	(original)
+++ python/branches/py3k/Doc/library/exceptions.rst	Fri Aug 31 19:17:17 2007
@@ -126,12 +126,9 @@
 
 .. exception:: EOFError
 
-   Raised when attempting to read beyond the end of a file. (N.B.: the :meth:`read`
-   and :meth:`readline` methods of file objects return an empty string when they
-   hit EOF.)
-
-   .. % XXXJH xrefs here
-   .. % XXXJH xrefs here
+   Raised when attempting to read beyond the end of a file. (N.B.: the
+   :meth:`file.read` and :meth:`file.readline` methods return an empty string
+   when they hit EOF.)
 
 
 .. exception:: FloatingPointError
@@ -154,12 +151,10 @@
 
 .. exception:: IOError
 
-   Raised when an I/O operation (such as a :keyword:`print` statement, the built-in
-   :func:`open` function or a method of a file object) fails for an I/O-related
+   Raised when an I/O operation (such as the built-in :func:`print` or
+   :func:`open` functions or a method of a file object) fails for an I/O-related
    reason, e.g., "file not found" or "disk full".
 
-   .. % XXXJH xrefs here
-
    This class is derived from :exc:`EnvironmentError`.  See the discussion above
    for more information on exception instance attributes.
 
@@ -169,8 +164,6 @@
    Raised when an :keyword:`import` statement fails to find the module definition
    or when a ``from ... import`` fails to find a name that is to be imported.
 
-   .. % XXXJH xref to import statement?
-
 
 .. exception:: IndexError
 
@@ -191,12 +184,10 @@
 .. exception:: KeyboardInterrupt
 
    Raised when the user hits the interrupt key (normally :kbd:`Control-C` or
-   :kbd:`Delete`).  During execution, a check for interrupts is made regularly. The
-   exception inherits from :exc:`BaseException` so as to not be accidentally caught
-   by code that catches :exc:`Exception` and thus prevent the interpreter from
-   exiting.
-
-   .. % XXX(hylton) xrefs here
+   :kbd:`Delete`).  During execution, a check for interrupts is made
+   regularly. The exception inherits from :exc:`BaseException` so as to not be
+   accidentally caught by code that catches :exc:`Exception` and thus prevent
+   the interpreter from exiting.
 
    .. versionchanged:: 2.5
       Changed to inherit from :exc:`BaseException`.
@@ -246,11 +237,7 @@
    represented.  This cannot occur for long integers (which would rather raise
    :exc:`MemoryError` than give up).  Because of the lack of standardization of
    floating point exception handling in C, most floating point operations also
-   aren't checked.  For plain integers, all operations that can overflow are
-   checked except left shift, where typical applications prefer to drop bits than
-   raise an exception.
-
-   .. % XXXJH reference to long's and/or int's?
+   aren't checked.
 
 
 .. exception:: ReferenceError
@@ -290,8 +277,6 @@
    or :func:`eval`, or when reading the initial script or standard input
    (also interactively).
 
-   .. % XXXJH xref to these functions?
-
    Instances of this class have attributes :attr:`filename`, :attr:`lineno`,
    :attr:`offset` and :attr:`text` for easier access to the details.  :func:`str`
    of the exception instance returns only the message.
@@ -319,8 +304,6 @@
    it has another type (such as a string), the object's value is printed and the
    exit status is one.
 
-   .. % XXX(hylton) xref to module sys?
-
    Instances have an attribute :attr:`code` which is set to the proposed exit
    status or error message (defaulting to ``None``). Also, this exception derives
    directly from :exc:`BaseException` and not :exc:`Exception`, since it is not

Modified: python/branches/py3k/Doc/library/getopt.rst
==============================================================================
--- python/branches/py3k/Doc/library/getopt.rst	(original)
+++ python/branches/py3k/Doc/library/getopt.rst	Fri Aug 31 19:17:17 2007
@@ -9,13 +9,11 @@
 
 This module helps scripts to parse the command line arguments in ``sys.argv``.
 It supports the same conventions as the Unix :cfunc:`getopt` function (including
-the special meanings of arguments of the form '``-``' and '``-``\ ``-``'). Long
+the special meanings of arguments of the form '``-``' and '``--``'). Long
 options similar to those supported by GNU software may be used as well via an
 optional third argument. This module provides a single function and an
 exception:
 
-.. % That's to fool latex2html into leaving the two hyphens alone!
-
 
 .. function:: getopt(args, options[, long_options])
 
@@ -32,7 +30,7 @@
       work.
 
    *long_options*, if specified, must be a list of strings with the names of the
-   long options which should be supported.  The leading ``'-``\ ``-'`` characters
+   long options which should be supported.  The leading ``'--'`` characters
    should not be included in the option name.  Long options which require an
    argument should be followed by an equal sign (``'='``).  To accept only long
    options, *options* should be an empty string.  Long options on the command line
@@ -46,7 +44,7 @@
    option list was stripped (this is a trailing slice of *args*).  Each
    option-and-value pair returned has the option as its first element, prefixed
    with a hyphen for short options (e.g., ``'-x'``) or two hyphens for long
-   options (e.g., ``'-``\ ``-long-option'``), and the option argument as its
+   options (e.g., ``'--long-option'``), and the option argument as its
    second element, or an empty string if the option has no argument.  The
    options occur in the list in the same order in which they were found, thus
    allowing multiple occurrences.  Long and short options may be mixed.

Modified: python/branches/py3k/Doc/library/logging.rst
==============================================================================
--- python/branches/py3k/Doc/library/logging.rst	(original)
+++ python/branches/py3k/Doc/library/logging.rst	Fri Aug 31 19:17:17 2007
@@ -611,7 +611,7 @@
 format of the messages was also changed, and output went to the specified file
 rather than the console.
 
-.. XXX logging should probably be updated!
+.. XXX logging should probably be updated for new string formatting!
 
 Formatting uses the old Python string formatting - see section
 :ref:`old-string-formatting`. The format string takes the following common

Modified: python/branches/py3k/Doc/library/new.rst
==============================================================================
--- python/branches/py3k/Doc/library/new.rst	(original)
+++ python/branches/py3k/Doc/library/new.rst	Fri Aug 31 19:17:17 2007
@@ -37,7 +37,7 @@
 
    This function is an interface to the :cfunc:`PyCode_New` C function.
 
-   .. % XXX This is still undocumented!!!!!!!!!!!
+   .. XXX This is still undocumented!!!
 
 
 .. function:: module(name[, doc])

Modified: python/branches/py3k/Doc/library/nntplib.rst
==============================================================================
--- python/branches/py3k/Doc/library/nntplib.rst	(original)
+++ python/branches/py3k/Doc/library/nntplib.rst	Fri Aug 31 19:17:17 2007
@@ -316,7 +316,7 @@
    is supplied, then the returned *list* is an empty list. This is an optional NNTP
    extension, and may not be supported by all servers.
 
-   .. % XXX huh?  Should that be name, description?
+   .. % XXX huh?  Should that be (name, description)?
 
    RFC2980 says "It is suggested that this extension be deprecated".  Use
    :meth:`descriptions` or :meth:`description` instead.

Modified: python/branches/py3k/Doc/library/ossaudiodev.rst
==============================================================================
--- python/branches/py3k/Doc/library/ossaudiodev.rst	(original)
+++ python/branches/py3k/Doc/library/ossaudiodev.rst	Fri Aug 31 19:17:17 2007
@@ -89,10 +89,6 @@
    second is required.  This is a historical artifact for compatibility with the
    older :mod:`linuxaudiodev` module which :mod:`ossaudiodev` supersedes.
 
-   .. % XXX it might also be motivated
-   .. % by my unfounded-but-still-possibly-true belief that the default
-   .. % audio device varies unpredictably across operating systems.  -GW
-
 
 .. function:: openmixer([device])
 

Modified: python/branches/py3k/Doc/library/posix.rst
==============================================================================
--- python/branches/py3k/Doc/library/posix.rst	(original)
+++ python/branches/py3k/Doc/library/posix.rst	Fri Aug 31 19:17:17 2007
@@ -60,17 +60,11 @@
    CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS" \
            ./configure
 
-On large-file-capable Linux systems, this might work:
-
-.. % $ <-- bow to font-lock
-
-::
+On large-file-capable Linux systems, this might work::
 
    CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g -O2 $CFLAGS" \
            ./configure
 
-.. % $ <-- bow to font-lock
-
 
 .. _posix-contents:
 

Modified: python/branches/py3k/Doc/library/re.rst
==============================================================================
--- python/branches/py3k/Doc/library/re.rst	(original)
+++ python/branches/py3k/Doc/library/re.rst	Fri Aug 31 19:17:17 2007
@@ -504,7 +504,12 @@
    character class or preceded by an unescaped backslash, all characters from the
    leftmost such ``'#'`` through the end of the line are ignored.
 
-   .. % XXX should add an example here
+   This means that the two following regular expression objects are equal::
+
+      re.compile(r""" [a-z]+   # some letters
+                      \.\.     # two dots
+                      [a-z]*   # perhaps more letters""")
+      re.compile(r"[a-z]+\.\.[a-z]*")
 
 
 .. function:: search(pattern, string[, flags])

Modified: python/branches/py3k/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/py3k/Doc/library/stdtypes.rst	(original)
+++ python/branches/py3k/Doc/library/stdtypes.rst	Fri Aug 31 19:17:17 2007
@@ -137,6 +137,17 @@
 y <= z``, except that *y* is evaluated only once (but in both cases *z* is not
 evaluated at all when ``x < y`` is found to be false).
 
+.. index::
+   pair: operator; comparison
+   operator: ==
+   operator: <
+   operator: >
+   operator: <=
+   operator: >=
+   operator: !=
+   operator: is
+   operator: is not
+
 This table summarizes the comparison operations:
 
 +------------+-------------------------+-------+
@@ -160,14 +171,6 @@
 +------------+-------------------------+-------+
 
 .. index::
-   pair: operator; comparison
-   operator: ==
-   operator: is
-   operator: is not
-
-.. % XXX *All* others have funny characters < ! >
-
-.. index::
    pair: object; numeric
    pair: objects; comparing
 
@@ -1021,7 +1024,7 @@
    single: % formatting
    single: % interpolation
 
-.. XXX better?
+.. XXX is the note enough?
 
 .. note::
 
@@ -1182,8 +1185,6 @@
 Since Python strings have an explicit length, ``%s`` conversions do not assume
 that ``'\0'`` is the end of the string.
 
-.. % XXX Examples?
-
 For safety reasons, floating point precisions are clipped to 50; ``%f``
 conversions for numbers whose absolute value is over 1e25 are replaced by ``%g``
 conversions. [#]_  All other errors raise exceptions.
@@ -1380,7 +1381,8 @@
 :ref:`typesseq-mutable`), bytes objects, being "mutable ASCII strings" have
 further useful methods also found on strings.
 
-.. XXX documented "count" differently above
+.. XXX "count" is documented as a mutable sequence method differently above
+.. XXX perhaps just split bytes and list methods
 
 .. method:: bytes.count(sub[, start[, end]])
 
@@ -1960,6 +1962,8 @@
    module: os
    module: socket
 
+.. XXX this is quite out of date, must be updated with "io" module
+
 File objects are implemented using C's ``stdio`` package and can be
 created with the built-in :func:`file` and (more usually) :func:`open`
 constructors described in the :ref:`built-in-funcs` section. [#]_ File

Modified: python/branches/py3k/Doc/library/tabnanny.rst
==============================================================================
--- python/branches/py3k/Doc/library/tabnanny.rst	(original)
+++ python/branches/py3k/Doc/library/tabnanny.rst	Fri Aug 31 19:17:17 2007
@@ -66,5 +66,3 @@
    Module :mod:`tokenize`
       Lexical scanner for Python source code.
 
-   .. % XXX may be add a reference to IDLE?
-

Modified: python/branches/py3k/Doc/library/tix.rst
==============================================================================
--- python/branches/py3k/Doc/library/tix.rst	(original)
+++ python/branches/py3k/Doc/library/tix.rst	Fri Aug 31 19:17:17 2007
@@ -79,8 +79,6 @@
 
    package ifneeded Tix 8.1 [list load "[file join $dir tix8183.dll]" Tix]
 
-.. % $ <-- bow to font-lock
-
 
 Tix Widgets
 -----------
@@ -489,16 +487,6 @@
    <http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixForm.htm>`_ geometry
    manager based on attachment rules for all Tk widgets.
 
-.. % begin{latexonly}
-.. % \subsection{Tix Class Structure}
-.. % 
-.. % \begin{figure}[hbtp]
-.. % \centerline{\epsfig{file=hierarchy.png,width=.9\textwidth}}
-.. % \vspace{.5cm}
-.. % \caption{The Class Hierarchy of Tix Widgets}
-.. % \end{figure}
-.. % end{latexonly}
-
 
 Tix Commands
 ------------

Modified: python/branches/py3k/Doc/library/tkinter.rst
==============================================================================
--- python/branches/py3k/Doc/library/tkinter.rst	(original)
+++ python/branches/py3k/Doc/library/tkinter.rst	Fri Aug 31 19:17:17 2007
@@ -182,17 +182,6 @@
 A Simple Hello World Program
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-.. % HelloWorld.html
-.. % begin{latexonly}
-.. % \begin{figure}[hbtp]
-.. % \centerline{\epsfig{file=HelloWorld.gif,width=.9\textwidth}}
-.. % \vspace{.5cm}
-.. % \caption{HelloWorld gadget image}
-.. % \end{figure}
-.. % See also the hello-world \ulink{notes}{classes/HelloWorld-notes.html} and
-.. % \ulink{summary}{classes/HelloWorld-summary.html}.
-.. % end{latexonly}
-
 ::
 
    from Tkinter import *

Modified: python/branches/py3k/Doc/library/undoc.rst
==============================================================================
--- python/branches/py3k/Doc/library/undoc.rst	(original)
+++ python/branches/py3k/Doc/library/undoc.rst	Fri Aug 31 19:17:17 2007
@@ -172,15 +172,3 @@
 in the build tree and either rebuilding Python if the modules are statically
 linked, or building and installing the shared object if using dynamically-loaded
 extensions.
-
-.. % %% lib-old is empty as of Python 2.5
-.. % Those which are written in Python will be installed into the directory
-.. % \file{lib-old/} installed as part of the standard library.  To use
-.. % these, the directory must be added to \code{sys.path}, possibly using
-.. % \envvar{PYTHONPATH}.
-
-.. % XXX need Windows instructions!
-
-
-   --- This section should be empty for Python 3.0.
-

Modified: python/branches/py3k/Doc/reference/datamodel.rst
==============================================================================
--- python/branches/py3k/Doc/reference/datamodel.rst	(original)
+++ python/branches/py3k/Doc/reference/datamodel.rst	Fri Aug 31 19:17:17 2007
@@ -1193,12 +1193,6 @@
    used when an "informal" string representation of instances of that class is
    required.
 
-   .. index::
-      pair: string; conversion
-      pair: reverse; quotes
-      pair: backward; quotes
-      single: back-quotes
-
    This is typically used for debugging, so it is important that the representation
    is information-rich and unambiguous.
 

Modified: python/branches/py3k/Doc/tutorial/introduction.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/introduction.rst	(original)
+++ python/branches/py3k/Doc/tutorial/introduction.rst	Fri Aug 31 19:17:17 2007
@@ -11,13 +11,6 @@
 line by itself in an example means you must type a blank line; this is used to
 end a multi-line command.
 
-.. % 
-.. % \footnote{
-.. % I'd prefer to use different fonts to distinguish input
-.. % from output, but the amount of LaTeX hacking that would require
-.. % is currently beyond my ability.
-.. % }
-
 Many of the examples in this manual, even those entered at the interactive
 prompt, include comments.  Comments in Python start with the hash character,
 ``'#'``, and extend to the end of the physical line.  A comment may appear at


More information about the Python-3000-checkins mailing list