diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 22:26:02 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 22:26:02 (GMT) |
commit | 5c3674648aba6a27f14b2e9d13f2def4721560e2 (patch) | |
tree | 8689ff0615e24d336abde272d81347c33b99d2ca | |
parent | 3e876edd758c4a243ea9231bee074c5324c4a1c0 (diff) | |
download | cpython-5c3674648aba6a27f14b2e9d13f2def4721560e2.zip cpython-5c3674648aba6a27f14b2e9d13f2def4721560e2.tar.gz cpython-5c3674648aba6a27f14b2e9d13f2def4721560e2.tar.bz2 |
Merged revisions 82571,82603,82845,82852,82953,82981,83013,83077,83082,83164,83251 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
................
r82571 | senthil.kumaran | 2010-07-05 13:44:34 +0200 (Mo, 05 Jul 2010) | 9 lines
Merged revisions 82570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82570 | senthil.kumaran | 2010-07-05 17:11:42 +0530 (Mon, 05 Jul 2010) | 3 lines
Fix: Issue9091 Minor documentation clarification.
........
................
r82603 | senthil.kumaran | 2010-07-06 05:06:53 +0200 (Di, 06 Jul 2010) | 9 lines
Merged revisions 82601 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82601 | senthil.kumaran | 2010-07-06 07:38:36 +0530 (Tue, 06 Jul 2010) | 3 lines
Change 'lowered' to 'lowercased'
........
................
r82845 | antoine.pitrou | 2010-07-12 22:11:52 +0200 (Mo, 12 Jul 2010) | 9 lines
Merged revisions 82842 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82842 | antoine.pitrou | 2010-07-12 22:01:52 +0200 (lun., 12 juil. 2010) | 3 lines
Fix definition of len() and indexing for memoryview objects (part of #7696).
........
................
r82852 | jeroen.ruigrok | 2010-07-13 17:08:30 +0200 (Di, 13 Jul 2010) | 9 lines
Merged revisions 82849 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82849 | jeroen.ruigrok | 2010-07-13 16:47:01 +0200 (di, 13 jul 2010) | 2 lines
Fix documentation typo: wprite() -> write().
........
................
r82953 | benjamin.peterson | 2010-07-18 16:26:34 +0200 (So, 18 Jul 2010) | 9 lines
Merged revisions 82952 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82952 | benjamin.peterson | 2010-07-18 09:23:36 -0500 (Sun, 18 Jul 2010) | 1 line
use classmethod
........
................
r82981 | antoine.pitrou | 2010-07-19 20:10:42 +0200 (Mo, 19 Jul 2010) | 3 lines
Issue #9304: fix example in the 2.x memoryview documentation.
................
r83013 | brett.cannon | 2010-07-21 11:52:10 +0200 (Mi, 21 Jul 2010) | 2 lines
Backport r82456.
................
r83077 | brett.cannon | 2010-07-23 14:07:27 +0200 (Fr, 23 Jul 2010) | 12 lines
Merged revisions 83072 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83072 | brett.cannon | 2010-07-23 12:31:31 +0100 (Fri, 23 Jul 2010) | 5 lines
Document the fact that the 'test' package is meant only for use by Python
itself and not by others.
Closes issue 9255.
........
................
r83082 | brett.cannon | 2010-07-23 14:30:10 +0200 (Fr, 23 Jul 2010) | 12 lines
Merged revisions 83080 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83080 | brett.cannon | 2010-07-23 13:26:35 +0100 (Fri, 23 Jul 2010) | 5 lines
Clarify the wording for threading.is_alive() to not suggest something is
"roughly" done.
Closes issue 9339. Thanks Brian Brazil for the patch.
........
................
r83164 | andrew.kuchling | 2010-07-26 15:42:35 +0200 (Mo, 26 Jul 2010) | 9 lines
Merged revisions 83163 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83163 | andrew.kuchling | 2010-07-26 09:08:58 -0400 (Mon, 26 Jul 2010) | 1 line
Reword paragraph
........
................
r83251 | skip.montanaro | 2010-07-30 04:04:10 +0200 (Fr, 30 Jul 2010) | 2 lines
Make sure all files are opened in binary mode.
................
-rw-r--r-- | Doc/library/collections.rst | 2 | ||||
-rw-r--r-- | Doc/library/csv.rst | 6 | ||||
-rw-r--r-- | Doc/library/dis.rst | 16 | ||||
-rw-r--r-- | Doc/library/os.rst | 7 | ||||
-rw-r--r-- | Doc/library/stdtypes.rst | 3 | ||||
-rw-r--r-- | Doc/library/test.rst | 7 | ||||
-rw-r--r-- | Doc/library/threading.rst | 4 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
8 files changed, 33 insertions, 15 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 1f563ee..b74c24d 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -576,7 +576,7 @@ In addition to the methods inherited from tuples, named tuples support three additional methods and one attribute. To prevent conflicts with field names, the method and attribute names start with an underscore. -.. method:: somenamedtuple._make(iterable) +.. classmethod:: somenamedtuple._make(iterable) Class method that makes a new instance from an existing sequence or iterable. diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 407efd0..c399bb7 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -78,7 +78,7 @@ The :mod:`csv` module defines the following functions: A short usage example:: >>> import csv - >>> spamReader = csv.reader(open('eggs.csv'), delimiter=' ', quotechar='|') + >>> spamReader = csv.reader(open('eggs.csv', 'rb'), delimiter=' ', quotechar='|') >>> for row in spamReader: ... print ', '.join(row) Spam, Spam, Spam, Spam, Spam, Baked Beans @@ -116,7 +116,7 @@ The :mod:`csv` module defines the following functions: A short usage example:: >>> import csv - >>> spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=' ', + >>> spamWriter = csv.writer(open('eggs.csv', 'wb'), delimiter=' ', ... quotechar='|', quoting=csv.QUOTE_MINIMAL) >>> spamWriter.writerow(['Spam'] * 5 + ['Baked Beans']) >>> spamWriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam']) @@ -234,7 +234,7 @@ The :mod:`csv` module defines the following classes: An example for :class:`Sniffer` use:: - csvfile = open("example.csv") + csvfile = open("example.csv", "rb") dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 38797ff..e3f30cb 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -6,11 +6,17 @@ :synopsis: Disassembler for Python bytecode. -The :mod:`dis` module supports the analysis of Python :term:`bytecode` by disassembling -it. Since there is no Python assembler, this module defines the Python assembly -language. The Python bytecode which this module takes as an input is defined -in the file :file:`Include/opcode.h` and used by the compiler and the -interpreter. +The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by +disassembling it. The CPython bytecode which this module takes as an +input is defined in the file :file:`Include/opcode.h` and used by the compiler +and the interpreter. + +.. impl-detail:: + + Bytecode is an implementation detail of the CPython interpreter! No + guarantees are made that bytecode will not be added, removed, or changed + between versions of Python. Use of this module should not be considered to + work across Python VMs or Python releases. Example: Given the function :func:`myfunc`:: diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 92b443e..5b3a922 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -705,7 +705,7 @@ as internal buffering of data. This function is intended for low-level I/O. For normal usage, use the built-in function :func:`open`, which returns a "file object" with - :meth:`~file.read` and :meth:`~file.wprite` methods (and many more). To + :meth:`~file.read` and :meth:`~file.write` methods (and many more). To wrap a file descriptor in a "file object", use :func:`fdopen`. @@ -2035,8 +2035,9 @@ written in Python, such as a mail server's external command delivery program. The :mod:`subprocess` module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using - this function. Use the :mod:`subprocess` module. Check especially the - :ref:`subprocess-replacements` section. + this function. See the + :ref:`subprocess-replacements` section in the :mod:`subprocess` documentation + for some helpful recipes. Availability: Unix, Windows. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 39bef7c..188d3eb 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -799,7 +799,8 @@ string functions based on regular expressions. .. method:: str.capitalize() - Return a copy of the string with only its first character capitalized. + Return a copy of the string with its first character capitalized and the + rest lowercased. For 8-bit strings, this method is locale-dependent. diff --git a/Doc/library/test.rst b/Doc/library/test.rst index f447ea4..c73e23e 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -6,6 +6,13 @@ :synopsis: Regression tests package containing the testing suite for Python. .. sectionauthor:: Brett Cannon <brett@python.org> +.. note:: + The :mod:`test` package is meant for internal use by Python only. It is + documented for the benefit of the core developers of Python. Any use of + this package outside of Python's standard library is discouraged as code + mentioned here can change or be removed without notice between releases of + Python. + The :mod:`test` package contains all regression tests for Python as well as the modules :mod:`test.test_support` and :mod:`test.regrtest`. diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 01f19a3..6a8ed0d 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -319,8 +319,8 @@ impossible to detect the termination of alien threads. Return whether the thread is alive. - Roughly, a thread is alive from the moment the :meth:`start` method - returns until its :meth:`run` method terminates. The module function + This method returns ``True`` just before the :meth:`run` method starts + until just after the :meth:`run` method terminates. The module function :func:`.enumerate` returns a list of all alive threads. .. method:: isDaemon() @@ -437,6 +437,9 @@ Tests Documentation ------------- +- Issue #9255: Document that the 'test' package is for internal Python use + only. + - Issue #8909: Added the size of the bitmap used in the installer created by distutils' bdist_wininst. Patch by Anatoly Techtonik. |