]> granicus.if.org Git - python/commitdiff
Merged revisions 68219 via svnmerge from
authorGeorg Brandl <georg@python.org>
Sat, 3 Jan 2009 21:17:04 +0000 (21:17 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 3 Jan 2009 21:17:04 +0000 (21:17 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines

  Fix uses of the default role.
........

Doc/distutils/uploading.rst
Doc/documenting/markup.rst
Doc/library/ast.rst
Doc/library/ctypes.rst
Doc/library/decimal.rst
Doc/library/fractions.rst
Doc/library/tempfile.rst

index d960656515ae29dd32660ee3c2df0b58fb2689b7..e3aa7c3f517614404aa4f12ce9d5c894c3d91826 100644 (file)
@@ -33,9 +33,9 @@ uploaded file using GPG (GNU Privacy Guard).  The  :program:`gpg` program must
 be available for execution on the system :envvar:`PATH`.  You can also specify
 which key to use for signing using the :option:`--identity=*name*` option.
 
-Other :command:`upload` options include  :option:`--repository=*url*` 
-or :option:`--repository=*section*` where `url` is the url of the server
-and `section` the name of the section in :file:`$HOME/.pypirc`, and
+Other :command:`upload` options include :option:`--repository=<url>` or
+:option:`--repository=<section>` where *url* is the url of the server and
+*section* the name of the section in :file:`$HOME/.pypirc`, and
 :option:`--show-response` (which displays the full response text from the PyPI
 server for help in debugging upload problems).
 
index e6f6a5268f59cc21ba4b780f4eabf9e5f10c20f2..b3f5a4a7ae201935a8ceed6bb57cc12a9d605c3f 100644 (file)
@@ -599,7 +599,7 @@ units as well as normal text:
    Example::
 
       .. versionadded:: 2.5
-         The `spam` parameter.
+         The *spam* parameter.
 
    Note that there must be no blank line between the directive head and the
    explanation; this is to make these blocks visually continuous in the markup.
@@ -760,7 +760,7 @@ the definition of the symbol.  There is this directive:
    Blank lines are not allowed within ``productionlist`` directive arguments.
 
    The definition can contain token names which are marked as interpreted text
-   (e.g. ``sum ::= `integer` "+" `integer```) -- this generates cross-references
+   (e.g. ``unaryneg ::= "-" `integer```) -- this generates cross-references
    to the productions of these tokens.
 
    Note that no further reST parsing is done in the production, so that you
index 88c022876f697807ae6625f6cc6207d9c82aac91..b8bc8966885989e732fe22ebd84812bbb37f8a44 100644 (file)
@@ -178,7 +178,7 @@ and classes for traversing abstract syntax trees:
 
    A node visitor base class that walks the abstract syntax tree and calls a
    visitor function for every node found.  This function may return a value
-   which is forwarded by the `visit` method.
+   which is forwarded by the :meth:`visit` method.
 
    This class is meant to be subclassed, with the subclass adding visitor
    methods.
@@ -207,11 +207,11 @@ and classes for traversing abstract syntax trees:
    A :class:`NodeVisitor` subclass that walks the abstract syntax tree and
    allows modification of nodes.
 
-   The `NodeTransformer` will walk the AST and use the return value of the
-   visitor methods to replace or remove the old node.  If the return value of
-   the visitor method is ``None``, the node will be removed from its location,
-   otherwise it is replaced with the return value.  The return value may be the
-   original node in which case no replacement takes place.
+   The :class:`NodeTransformer` will walk the AST and use the return value of
+   the visitor methods to replace or remove the old node.  If the return value
+   of the visitor method is ``None``, the node will be removed from its
+   location, otherwise it is replaced with the return value.  The return value
+   may be the original node in which case no replacement takes place.
 
    Here is an example transformer that rewrites all occurrences of name lookups
    (``foo``) to ``data['foo']``::
index a574b5698e00d670fb501c05b955e516b1d7c193..94d12788a4f0a14c779ff619f73ebef475f8bbd0 100644 (file)
@@ -1376,24 +1376,22 @@ it.
 The *mode* parameter can be used to specify how the library is loaded.  For
 details, consult the ``dlopen(3)`` manpage, on Windows, *mode* is ignored.
 
-The *use_errno* parameter, when set to True, enables a ctypes
-mechanism that allows to access the system `errno` error number in a
-safe way.  `ctypes` maintains a thread-local copy of the systems
-`errno` variable; if you call foreign functions created with
-`use_errno=True` then the `errno` value before the function call is
-swapped with the ctypes private copy, the same happens immediately
-after the function call.
-
-The function `ctypes.get_errno()` returns the value of the ctypes
-private copy, and the function `ctypes.set_errno(value)` changes the
-ctypes private copy to `value` and returns the former value.
-
-The *use_last_error* parameter, when set to True, enables the same
-mechanism for the Windows error code which is managed by the
-:func:`GetLastError` and :func:`SetLastError` Windows API functions;
-`ctypes.get_last_error()` and `ctypes.set_last_error(value)` are used
-to request and change the ctypes private copy of the windows error
-code.
+The *use_errno* parameter, when set to True, enables a ctypes mechanism that
+allows to access the system :data:`errno` error number in a safe way.
+:mod:`ctypes` maintains a thread-local copy of the systems :data:`errno`
+variable; if you call foreign functions created with ``use_errno=True`` then the
+:data:`errno` value before the function call is swapped with the ctypes private
+copy, the same happens immediately after the function call.
+
+The function :func:`ctypes.get_errno` returns the value of the ctypes private
+copy, and the function :func:`ctypes.set_errno` changes the ctypes private copy
+to a new value and returns the former value.
+
+The *use_last_error* parameter, when set to True, enables the same mechanism for
+the Windows error code which is managed by the :func:`GetLastError` and
+:func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` and
+:func:`ctypes.set_last_error` are used to request and change the ctypes private
+copy of the windows error code.
 
 .. data:: RTLD_GLOBAL
    :noindex:
@@ -1596,18 +1594,20 @@ type and the argument types of the function.
 .. function:: CFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
 
    The returned function prototype creates functions that use the standard C
-   calling convention.  The function will release the GIL during the call.
-   If `use_errno` is set to True, the ctypes private copy of the system `errno`
-   variable is exchanged with the real `errno` value bafore and after the call;
-   `use_last_error` does the same for the Windows error code.
+   calling convention.  The function will release the GIL during the call.  If
+   *use_errno* is set to True, the ctypes private copy of the system
+   :data:`errno` variable is exchanged with the real :data:`errno` value bafore
+   and after the call; *use_last_error* does the same for the Windows error
+   code.
 
 
 .. function:: WINFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
 
    Windows only: The returned function prototype creates functions that use the
-   ``stdcall`` calling convention, except on Windows CE where :func:`WINFUNCTYPE`
-   is the same as :func:`CFUNCTYPE`.  The function will release the GIL during the
-   call. `use_errno` and `use_last_error` have the same meaning as above.
+   ``stdcall`` calling convention, except on Windows CE where
+   :func:`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`.  The function will
+   release the GIL during the call.  *use_errno* and *use_last_error* have the
+   same meaning as above.
 
 
 .. function:: PYFUNCTYPE(restype, *argtypes)
@@ -1852,10 +1852,10 @@ Utility functions
 .. function:: find_library(name)
    :module: ctypes.util
 
-   Try to find a library and return a pathname.  `name` is the library name without
-   any prefix like `lib`, suffix like ``.so``, ``.dylib`` or version number (this
-   is the form used for the posix linker option :option:`-l`).  If no library can
-   be found, returns ``None``.
+   Try to find a library and return a pathname.  *name* is the library name
+   without any prefix like ``lib```, suffix like ``.so``, ``.dylib`` or version
+   number (this is the form used for the posix linker option :option:`-l`).  If
+   no library can be found, returns ``None``.
 
    The exact functionality is system dependent.
 
@@ -1887,12 +1887,12 @@ Utility functions
 .. function:: get_errno()
 
    Returns the current value of the ctypes-private copy of the system
-   `errno` variable in the calling thread.
+   :data:`errno` variable in the calling thread.
 
 .. function:: get_last_error()
 
    Windows only: returns the current value of the ctypes-private copy of the system
-   `LastError` variable in the calling thread.
+   :data:`LastError` variable in the calling thread.
 
 .. function:: memmove(dst, src, count)
 
@@ -1947,15 +1947,14 @@ Utility functions
 
 .. function:: set_errno(value)
 
-   Set the  current value of the ctypes-private copy of the system
-   `errno` variable in the calling thread to `value` and return the
-   previous value.
+   Set the current value of the ctypes-private copy of the system :data:`errno`
+   variable in the calling thread to *value* and return the previous value.
 
 .. function:: set_last_error(value)
 
-   Windows only: set the current value of the ctypes-private copy of
-   the system `LastError` variable in the calling thread to `value`
-   and return the previous value.
+   Windows only: set the current value of the ctypes-private copy of the system
+   :data:`LastError` variable in the calling thread to *value* and return the
+   previous value.
 
 .. function:: sizeof(obj_or_type)
 
index abf4ec57313acebc9e27711fa9fe28b3bfb50b96..3d84f8cde9bfeec92217da620312a990147425a4 100644 (file)
@@ -1114,7 +1114,7 @@ In addition to the three supplied contexts, new contexts can be created with the
 
    .. method:: logical_and(x, y)
 
-      Applies the logical operation `and` between each operand's digits.
+      Applies the logical operation *and* between each operand's digits.
 
 
    .. method:: logical_invert(x)
@@ -1124,12 +1124,12 @@ In addition to the three supplied contexts, new contexts can be created with the
 
    .. method:: logical_or(x, y)
 
-      Applies the logical operation `or` between each operand's digits.
+      Applies the logical operation *or* between each operand's digits.
 
 
    .. method:: logical_xor(x, y)
 
-      Applies the logical operation `xor` between each operand's digits.
+      Applies the logical operation *xor* between each operand's digits.
 
 
    .. method:: max(x, y)
@@ -1237,8 +1237,8 @@ In addition to the three supplied contexts, new contexts can be created with the
 
    .. method:: remainder_near(x, y)
 
-      Returns `x - y * n`, where *n* is the integer nearest the exact value
-      of `x / y` (if the result is `0` then its sign will be the sign of *x*).
+      Returns ``x - y * n``, where *n* is the integer nearest the exact value
+      of ``x / y`` (if the result is 0 then its sign will be the sign of *x*).
 
 
    .. method:: rotate(x, y)
index 0861e681d1101aceab09ff8dbacc7939efc14a68..68a8ef62957e4ed6cecb0661053acbc313c9ddfd 100644 (file)
@@ -126,11 +126,11 @@ another rational number, or from a string.
 
 .. function:: gcd(a, b)
 
-   Return the greatest common divisor of the integers `a` and `b`.  If
-   either `a` or `b` is nonzero, then the absolute value of `gcd(a,
-   b)` is the largest integer that divides both `a` and `b`.  `gcd(a,b)`
-   has the same sign as `b` if `b` is nonzero; otherwise it takes the sign
-   of `a`.  `gcd(0, 0)` returns `0`.
+   Return the greatest common divisor of the integers *a* and *b*.  If either
+   *a* or *b* is nonzero, then the absolute value of ``gcd(a, b)`` is the
+   largest integer that divides both *a* and *b*.  ``gcd(a,b)`` has the same
+   sign as *b* if *b* is nonzero; otherwise it takes the sign of *a*.  ``gcd(0,
+   0)`` returns ``0``.
 
 
 .. seealso::
index 11ae9f2ff5b92f63659de8a53a7a196e24ed82fa..36c875341c1ba8b7432814da9c908f92d151d7bb 100644 (file)
@@ -149,11 +149,11 @@ The module defines the following user-callable functions:
 
    .. warning::
 
-      Use of this function may introduce a security hole in your program.
-      By the time you get around to doing anything with the file name it
-      returns, someone else may have beaten you to the punch.
-      :func:`mktemp` usage can be replaced easily with
-      :func:`NamedTemporaryFile`, passing it the  `delete=False` parameter::
+      Use of this function may introduce a security hole in your program.  By
+      the time you get around to doing anything with the file name it returns,
+      someone else may have beaten you to the punch.  :func:`mktemp` usage can
+      be replaced easily with :func:`NamedTemporaryFile`, passing it the
+      ``delete=False`` parameter::
 
          >>> f = NamedTemporaryFile(delete=False)
          >>> f