[Python-checkins] r68867 - in python/branches/py3k: Doc/documenting/markup.rst Doc/library/io.rst Doc/library/subprocess.rst Doc/library/symtable.rst Lib/heapq.py Objects/stringlib/fastsearch.h

benjamin.peterson python-checkins at python.org
Fri Jan 23 04:26:37 CET 2009


Author: benjamin.peterson
Date: Fri Jan 23 04:26:36 2009
New Revision: 68867

Log:
Merged revisions 68750,68776-68777,68811,68842,68859 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68750 | benjamin.peterson | 2009-01-18 16:47:04 -0600 (Sun, 18 Jan 2009) | 1 line
  
  fix encoding cookie case
........
  r68776 | benjamin.peterson | 2009-01-19 10:17:54 -0600 (Mon, 19 Jan 2009) | 1 line
  
  move BufferedIOBase into the base class section
........
  r68777 | benjamin.peterson | 2009-01-19 10:18:27 -0600 (Mon, 19 Jan 2009) | 1 line
  
  add email address
........
  r68811 | benjamin.peterson | 2009-01-20 12:58:27 -0600 (Tue, 20 Jan 2009) | 1 line
  
  fix url
........
  r68842 | andrew.kuchling | 2009-01-20 20:16:26 -0600 (Tue, 20 Jan 2009) | 1 line
  
  Markup fixes
........
  r68859 | georg.brandl | 2009-01-22 12:29:28 -0600 (Thu, 22 Jan 2009) | 2 lines
  
  Clarify wording.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Doc/documenting/markup.rst
   python/branches/py3k/Doc/library/io.rst
   python/branches/py3k/Doc/library/subprocess.rst
   python/branches/py3k/Doc/library/symtable.rst
   python/branches/py3k/Lib/heapq.py
   python/branches/py3k/Objects/stringlib/fastsearch.h

Modified: python/branches/py3k/Doc/documenting/markup.rst
==============================================================================
--- python/branches/py3k/Doc/documenting/markup.rst	(original)
+++ python/branches/py3k/Doc/documenting/markup.rst	Fri Jan 23 04:26:36 2009
@@ -285,7 +285,8 @@
 As said before, Sphinx uses interpreted text roles to insert semantic markup in
 documents.
 
-Variable names are an exception, they should be marked simply with ``*var*``.
+Names of local variables, such as function/method arguments, are an exception,
+they should be marked simply with ``*var*``.
 
 For all other roles, you have to write ``:rolename:`content```.
 
@@ -310,7 +311,7 @@
 
 .. describe:: data
 
-   The name of a module-level variable.
+   The name of a module-level variable or constant.
 
 .. describe:: const
 

Modified: python/branches/py3k/Doc/library/io.rst
==============================================================================
--- python/branches/py3k/Doc/library/io.rst	(original)
+++ python/branches/py3k/Doc/library/io.rst	Fri Jan 23 04:26:36 2009
@@ -328,59 +328,6 @@
       ``len(b)``, since if the write fails, an :exc:`IOError` will be raised).
 
 
-Raw File I/O
-------------
-
-.. class:: FileIO(name[, mode])
-
-   :class:`FileIO` represents a file containing bytes data.  It implements
-   the :class:`RawIOBase` interface (and therefore the :class:`IOBase`
-   interface, too).
-
-   The *mode* can be ``'r'``, ``'w'`` or ``'a'`` for reading (default), writing,
-   or appending.  The file will be created if it doesn't exist when opened for
-   writing or appending; it will be truncated when opened for writing.  Add a
-   ``'+'`` to the mode to allow simultaneous reading and writing.
-
-   In addition to the attributes and methods from :class:`IOBase` and
-   :class:`RawIOBase`, :class:`FileIO` provides the following data
-   attributes and methods:
-
-   .. attribute:: mode
-
-      The mode as given in the constructor.
-
-   .. attribute:: name
-
-      The file name.  This is the file descriptor of the file when no name is
-      given in the constructor.
-
-   .. method:: read([n])
-
-      Read and return at most *n* bytes.  Only one system call is made, so it is
-      possible that less data than was requested is returned.  Use :func:`len`
-      on the returned bytes object to see how many bytes were actually returned.
-      (In non-blocking mode, ``None`` is returned when no data is available.)
-
-   .. method:: readall()
-
-      Read and return the entire file's contents in a single bytes object.  As
-      much as immediately available is returned in non-blocking mode.  If the
-      EOF has been reached, ``b''`` is returned.
-
-   .. method:: write(b)
-
-      Write the bytes or bytearray object, *b*, to the file, and return
-      the number actually written. Only one system call is made, so it
-      is possible that only some of the data is written.
-
-   Note that the inherited ``readinto()`` method should not be used on
-   :class:`FileIO` objects.
-
-
-Buffered Streams
-----------------
-
 .. class:: BufferedIOBase
 
    Base class for streams that support buffering.  It inherits :class:`IOBase`.
@@ -438,6 +385,59 @@
       underlying raw stream cannot accept more data at the moment.
 
 
+Raw File I/O
+------------
+
+.. class:: FileIO(name[, mode])
+
+   :class:`FileIO` represents a file containing bytes data.  It implements
+   the :class:`RawIOBase` interface (and therefore the :class:`IOBase`
+   interface, too).
+
+   The *mode* can be ``'r'``, ``'w'`` or ``'a'`` for reading (default), writing,
+   or appending.  The file will be created if it doesn't exist when opened for
+   writing or appending; it will be truncated when opened for writing.  Add a
+   ``'+'`` to the mode to allow simultaneous reading and writing.
+
+   In addition to the attributes and methods from :class:`IOBase` and
+   :class:`RawIOBase`, :class:`FileIO` provides the following data
+   attributes and methods:
+
+   .. attribute:: mode
+
+      The mode as given in the constructor.
+
+   .. attribute:: name
+
+      The file name.  This is the file descriptor of the file when no name is
+      given in the constructor.
+
+   .. method:: read([n])
+
+      Read and return at most *n* bytes.  Only one system call is made, so it is
+      possible that less data than was requested is returned.  Use :func:`len`
+      on the returned bytes object to see how many bytes were actually returned.
+      (In non-blocking mode, ``None`` is returned when no data is available.)
+
+   .. method:: readall()
+
+      Read and return the entire file's contents in a single bytes object.  As
+      much as immediately available is returned in non-blocking mode.  If the
+      EOF has been reached, ``b''`` is returned.
+
+   .. method:: write(b)
+
+      Write the bytes or bytearray object, *b*, to the file, and return
+      the number actually written. Only one system call is made, so it
+      is possible that only some of the data is written.
+
+   Note that the inherited ``readinto()`` method should not be used on
+   :class:`FileIO` objects.
+
+
+Buffered Streams
+----------------
+
 .. class:: BytesIO([initial_bytes])
 
    A stream implementation using an in-memory bytes buffer.  It inherits

Modified: python/branches/py3k/Doc/library/subprocess.rst
==============================================================================
--- python/branches/py3k/Doc/library/subprocess.rst	(original)
+++ python/branches/py3k/Doc/library/subprocess.rst	Fri Jan 23 04:26:36 2009
@@ -160,11 +160,12 @@
 
    Run command with arguments and return its output as a byte string.
 
-   If the exit code was non-zero it raises a CalledProcessError.  The
-   CalledProcessError object will have the return code in the returncode
-   attribute and output in the output attribute.
+   If the exit code was non-zero it raises a :exc:`CalledProcessError`.  The
+   :exc:`CalledProcessError` object will have the return code in the
+   :attr:`returncode`
+   attribute and output in the :attr:`output` attribute.
 
-   The arguments are the same as for the Popen constructor.  Example:
+   The arguments are the same as for the :class:`Popen` constructor.  Example:
 
       >>> subprocess.check_output(["ls", "-l", "/dev/null"])
       'crw-rw-rw- 1 root root 1, 3 Oct 18  2007 /dev/null\n'

Modified: python/branches/py3k/Doc/library/symtable.rst
==============================================================================
--- python/branches/py3k/Doc/library/symtable.rst	(original)
+++ python/branches/py3k/Doc/library/symtable.rst	Fri Jan 23 04:26:36 2009
@@ -5,7 +5,7 @@
    :synopsis: Interface to the compiler's internal symbol tables.
 
 .. moduleauthor:: Jeremy Hylton <jeremy at alum.mit.edu>
-.. sectionauthor:: Benjamin Peterson
+.. sectionauthor:: Benjamin Peterson <benjamin at python.org>
 
 
 Symbol tables are generated by the compiler from AST just before bytecode is

Modified: python/branches/py3k/Lib/heapq.py
==============================================================================
--- python/branches/py3k/Lib/heapq.py	(original)
+++ python/branches/py3k/Lib/heapq.py	Fri Jan 23 04:26:36 2009
@@ -1,4 +1,4 @@
-# -*- coding: Latin-1 -*-
+# -*- coding: latin-1 -*-
 
 """Heap queue algorithm (a.k.a. priority queue).
 

Modified: python/branches/py3k/Objects/stringlib/fastsearch.h
==============================================================================
--- python/branches/py3k/Objects/stringlib/fastsearch.h	(original)
+++ python/branches/py3k/Objects/stringlib/fastsearch.h	Fri Jan 23 04:26:36 2009
@@ -5,7 +5,7 @@
 
 /* fast search/count implementation, based on a mix between boyer-
    moore and horspool, with a few more bells and whistles on the top.
-   for some more background, see: http://effbot.org/stringlib */
+   for some more background, see: http://effbot.org/stringlib.htm */
 
 /* note: fastsearch may access s[n], which isn't a problem when using
    Python's ordinary string types, but may cause problems if you're


More information about the Python-checkins mailing list