diff options
author | Éric Araujo <merwok@netwok.org> | 2011-04-27 14:25:27 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-04-27 14:25:27 (GMT) |
commit | 19acb88baf6026307e21d27a4bd7fb33a51344c1 (patch) | |
tree | 4d41892cf82081773a18805b22b94b49433b19a3 /Doc | |
parent | edd117fd279a8c7339ec2d6d88633218ef9d891e (diff) | |
parent | ce4c4074f9322463fa714650c76f869ddcf2cb08 (diff) | |
download | cpython-19acb88baf6026307e21d27a4bd7fb33a51344c1.zip cpython-19acb88baf6026307e21d27a4bd7fb33a51344c1.tar.gz cpython-19acb88baf6026307e21d27a4bd7fb33a51344c1.tar.bz2 |
Branch merge
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/intro.rst | 3 | ||||
-rw-r--r-- | Doc/c-api/object.rst | 1 | ||||
-rw-r--r-- | Doc/distutils/examples.rst | 2 | ||||
-rw-r--r-- | Doc/documenting/markup.rst | 25 | ||||
-rw-r--r-- | Doc/library/collections.rst | 4 | ||||
-rw-r--r-- | Doc/library/dbm.rst | 4 | ||||
-rw-r--r-- | Doc/library/json.rst | 2 | ||||
-rw-r--r-- | Doc/library/runpy.rst | 2 |
8 files changed, 29 insertions, 14 deletions
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 0c4f816..83b98f9 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -511,13 +511,12 @@ interpreter can only be used after the interpreter has been initialized. module: builtins module: __main__ module: sys - module: exceptions triple: module; search; path single: path (in module sys) The basic initialization function is :c:func:`Py_Initialize`. This initializes the table of loaded modules, and creates the fundamental modules -:mod:`builtins`, :mod:`__main__`, :mod:`sys`, and :mod:`exceptions`. It also +:mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also initializes the module search path (``sys.path``). .. index:: single: PySys_SetArgvEx() diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index afa08c9..d0d45ad 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -258,7 +258,6 @@ is considered sufficient for this determination. This is the equivalent of the Python expression ``hash(o)``. .. versionchanged:: 3.2 - The return type is now Py_hash_t. This is a signed integer the same size as Py_ssize_t. diff --git a/Doc/distutils/examples.rst b/Doc/distutils/examples.rst index e31ff72..b268486 100644 --- a/Doc/distutils/examples.rst +++ b/Doc/distutils/examples.rst @@ -279,7 +279,7 @@ For example, if the :file:`setup.py` script is changed like this:: Where the long description is broken, ``check`` will be able to detect it by using the :mod:`docutils` parser:: - $ pythontrunk setup.py check --restructuredtext + $ python setup.py check --restructuredtext running check warning: check: Title underline too short. (line 2) warning: check: Could not finish the parsing. diff --git a/Doc/documenting/markup.rst b/Doc/documenting/markup.rst index 277ca9f..1f5b1e3 100644 --- a/Doc/documenting/markup.rst +++ b/Doc/documenting/markup.rst @@ -152,7 +152,7 @@ The directives are: Describes global data in a module, including both variables and values used as "defined constants." Class and object attributes are not documented - using this environment. + using this directive. .. describe:: exception @@ -165,7 +165,7 @@ The directives are: parameters, enclosing optional parameters in brackets. Default values can be given if it enhances clarity. For example:: - .. function:: Timer.repeat([repeat=3[, number=1000000]]) + .. function:: repeat([repeat=3[, number=1000000]]) Object methods are not documented using this directive. Bound object methods placed in the module namespace as part of the public interface of the module @@ -217,13 +217,30 @@ The directives are: Describes an object data attribute. The description should include information about the type of the data to be expected and whether it may be - changed directly. + changed directly. This directive should be nested in a class directive, + like in this example:: + + .. class:: Spam + + Description of the class. + + .. data:: ham + + Description of the attribute. + + If is also possible to document an attribute outside of a class directive, + for example if the documentation for different attributes and methods is + split in multiple sections. The class name should then be included + explicitly:: + + .. data:: Spam.eggs .. describe:: method Describes an object method. The parameters should not include the ``self`` parameter. The description should include similar information to that - described for ``function``. + described for ``function``. This method should be nested in a class + method, like in the example above. .. describe:: decoratormethod diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 1849e4c..d29bc17 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -205,14 +205,14 @@ counts, but the output will exclude results with counts of zero or less. * `Bag class <http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_ in Smalltalk. - * Wikipedia entry for `Multisets <http://en.wikipedia.org/wiki/Multiset>`_\. + * Wikipedia entry for `Multisets <http://en.wikipedia.org/wiki/Multiset>`_. * `C++ multisets <http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_ tutorial with examples. * For mathematical operations on multisets and their use cases, see *Knuth, Donald. The Art of Computer Programming Volume II, - Section 4.6.3, Exercise 19*\. + Section 4.6.3, Exercise 19*. * To enumerate all distinct multisets of a given size over a given set of elements, see :func:`itertools.combinations_with_replacement`. diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst index 0cd873e..e3d50b9 100644 --- a/Doc/library/dbm.rst +++ b/Doc/library/dbm.rst @@ -30,9 +30,9 @@ the Oracle Berkeley DB. name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'``. -.. function:: open(filename, flag='r', mode=0o666) +.. function:: open(file, flag='r', mode=0o666) - Open the database file *filename* and return a corresponding object. + Open the database file *file* and return a corresponding object. If the database file already exists, the :func:`whichdb` function is used to determine its type and the appropriate module is used; if it does not exist, diff --git a/Doc/library/json.rst b/Doc/library/json.rst index dcd6973..4ee17f2 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -34,7 +34,7 @@ Encoding basic Python object hierarchies:: Compact encoding:: >>> import json - >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':')) + >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',', ':')) '[1,2,3,{"4":5,"6":7}]' Pretty printing:: diff --git a/Doc/library/runpy.rst b/Doc/library/runpy.rst index f7c77f6..4df622c 100644 --- a/Doc/library/runpy.rst +++ b/Doc/library/runpy.rst @@ -49,7 +49,7 @@ The :mod:`runpy` module provides two functions: loader does not make filename information available, this variable is set to :const:`None`. - ``__cached__`` will be set to ``None``. + ``__cached__`` will be set to ``None``. ``__loader__`` is set to the :pep:`302` module loader used to retrieve the code for the module (This loader may be a wrapper around the standard |