From: Éric Araujo Date: Wed, 20 Apr 2011 17:24:09 +0000 (+0200) Subject: Merge 3.1 X-Git-Tag: v3.2.1b1~71^2~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37e6c54ba122703a0162dd44cf3eac78c46c8bdd;p=python Merge 3.1 --- 37e6c54ba122703a0162dd44cf3eac78c46c8bdd diff --cc Doc/c-api/intro.rst index 0c4f816ff8,c008b5c93d..83b98f9b4c --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@@ -514,21 -514,20 +514,20 @@@ interpreter can only be used after the triple: module; search; path single: path (in module sys) -The basic initialization function is :cfunc:`Py_Initialize`. This initializes +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_SetArgv() +.. index:: single: PySys_SetArgvEx() -:cfunc:`Py_Initialize` does not set the "script argument list" (``sys.argv``). -If this variable is needed by Python code that will be executed later, it must -be set explicitly with a call to ``PySys_SetArgv(argc, argv)`` subsequent to -the call to :cfunc:`Py_Initialize`. +:c:func:`Py_Initialize` does not set the "script argument list" (``sys.argv``). +If this variable is needed by Python code that will be executed later, it must +be set explicitly with a call to ``PySys_SetArgvEx(argc, argv, updatepath)`` +after the call to :c:func:`Py_Initialize`. On most systems (in particular, on Unix and Windows, although the details are -slightly different), :cfunc:`Py_Initialize` calculates the module search path +slightly different), :c:func:`Py_Initialize` calculates the module search path based upon its best guess for the location of the standard Python interpreter executable, assuming that the Python library is found in a fixed location relative to the Python interpreter executable. In particular, it looks for a diff --cc Doc/documenting/markup.rst index 277ca9f2fc,be7718d82e..1f5b1e36e7 --- a/Doc/documenting/markup.rst +++ b/Doc/documenting/markup.rst @@@ -223,14 -208,9 +239,15 @@@ The directives are 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 + + Same as ``decorator``, but for decorators that are methods. + + Refer to a decorator method using the ``:meth:`` role. + .. describe:: opcode Describes a Python :term:`bytecode` instruction. diff --cc Lib/dbm/__init__.py index 6e890f36aa,57be17b408..76a43c43f3 --- a/Lib/dbm/__init__.py +++ b/Lib/dbm/__init__.py @@@ -23,19 -24,11 +23,11 @@@ It has the following interface (key an list = d.keys() # return a list of all existing keys (slow!) Future versions may change the order in which implementations are - tested for existence, add interfaces to other dbm-like + tested for existence, and add interfaces to other dbm-like implementations. - - The open function has an optional second argument. This can be 'r', - for read-only access, 'w', for read-write access of an existing - database, 'c' for read-write access to a new or existing database, and - 'n' for read-write access to a new database. The default is 'r'. - - Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it - only if it doesn't exist; and 'n' always creates a new database. """ -__all__ = ['open', 'whichdb', 'error', 'error'] +__all__ = ['open', 'whichdb', 'error'] import io import os