Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36ab1ef

Browse files
committed
Merged revisions 68219 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines Fix uses of the default role. ........
1 parent 45f5337 commit 36ab1ef

7 files changed

Lines changed: 62 additions & 63 deletions

File tree

Doc/distutils/uploading.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ uploaded file using GPG (GNU Privacy Guard). The :program:`gpg` program must
3333
be available for execution on the system :envvar:`PATH`. You can also specify
3434
which key to use for signing using the :option:`--identity=*name*` option.
3535

36-
Other :command:`upload` options include :option:`--repository=*url*`
37-
or :option:`--repository=*section*` where `url` is the url of the server
38-
and `section` the name of the section in :file:`$HOME/.pypirc`, and
36+
Other :command:`upload` options include :option:`--repository=<url>` or
37+
:option:`--repository=<section>` where *url* is the url of the server and
38+
*section* the name of the section in :file:`$HOME/.pypirc`, and
3939
:option:`--show-response` (which displays the full response text from the PyPI
4040
server for help in debugging upload problems).
4141

Doc/documenting/markup.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ units as well as normal text:
599599
Example::
600600

601601
.. versionadded:: 2.5
602-
The `spam` parameter.
602+
The *spam* parameter.
603603

604604
Note that there must be no blank line between the directive head and the
605605
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:
760760
Blank lines are not allowed within ``productionlist`` directive arguments.
761761

762762
The definition can contain token names which are marked as interpreted text
763-
(e.g. ``sum ::= `integer` "+" `integer```) -- this generates cross-references
763+
(e.g. ``unaryneg ::= "-" `integer```) -- this generates cross-references
764764
to the productions of these tokens.
765765

766766
Note that no further reST parsing is done in the production, so that you

Doc/library/ast.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ and classes for traversing abstract syntax trees:
178178

179179
A node visitor base class that walks the abstract syntax tree and calls a
180180
visitor function for every node found. This function may return a value
181-
which is forwarded by the `visit` method.
181+
which is forwarded by the :meth:`visit` method.
182182

183183
This class is meant to be subclassed, with the subclass adding visitor
184184
methods.
@@ -207,11 +207,11 @@ and classes for traversing abstract syntax trees:
207207
A :class:`NodeVisitor` subclass that walks the abstract syntax tree and
208208
allows modification of nodes.
209209

210-
The `NodeTransformer` will walk the AST and use the return value of the
211-
visitor methods to replace or remove the old node. If the return value of
212-
the visitor method is ``None``, the node will be removed from its location,
213-
otherwise it is replaced with the return value. The return value may be the
214-
original node in which case no replacement takes place.
210+
The :class:`NodeTransformer` will walk the AST and use the return value of
211+
the visitor methods to replace or remove the old node. If the return value
212+
of the visitor method is ``None``, the node will be removed from its
213+
location, otherwise it is replaced with the return value. The return value
214+
may be the original node in which case no replacement takes place.
215215

216216
Here is an example transformer that rewrites all occurrences of name lookups
217217
(``foo``) to ``data['foo']``::

Doc/library/ctypes.rst

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,24 +1376,22 @@ it.
13761376
The *mode* parameter can be used to specify how the library is loaded. For
13771377
details, consult the ``dlopen(3)`` manpage, on Windows, *mode* is ignored.
13781378

1379-
The *use_errno* parameter, when set to True, enables a ctypes
1380-
mechanism that allows to access the system `errno` error number in a
1381-
safe way. `ctypes` maintains a thread-local copy of the systems
1382-
`errno` variable; if you call foreign functions created with
1383-
`use_errno=True` then the `errno` value before the function call is
1384-
swapped with the ctypes private copy, the same happens immediately
1385-
after the function call.
1386-
1387-
The function `ctypes.get_errno()` returns the value of the ctypes
1388-
private copy, and the function `ctypes.set_errno(value)` changes the
1389-
ctypes private copy to `value` and returns the former value.
1390-
1391-
The *use_last_error* parameter, when set to True, enables the same
1392-
mechanism for the Windows error code which is managed by the
1393-
:func:`GetLastError` and :func:`SetLastError` Windows API functions;
1394-
`ctypes.get_last_error()` and `ctypes.set_last_error(value)` are used
1395-
to request and change the ctypes private copy of the windows error
1396-
code.
1379+
The *use_errno* parameter, when set to True, enables a ctypes mechanism that
1380+
allows to access the system :data:`errno` error number in a safe way.
1381+
:mod:`ctypes` maintains a thread-local copy of the systems :data:`errno`
1382+
variable; if you call foreign functions created with ``use_errno=True`` then the
1383+
:data:`errno` value before the function call is swapped with the ctypes private
1384+
copy, the same happens immediately after the function call.
1385+
1386+
The function :func:`ctypes.get_errno` returns the value of the ctypes private
1387+
copy, and the function :func:`ctypes.set_errno` changes the ctypes private copy
1388+
to a new value and returns the former value.
1389+
1390+
The *use_last_error* parameter, when set to True, enables the same mechanism for
1391+
the Windows error code which is managed by the :func:`GetLastError` and
1392+
:func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` and
1393+
:func:`ctypes.set_last_error` are used to request and change the ctypes private
1394+
copy of the windows error code.
13971395

13981396
.. data:: RTLD_GLOBAL
13991397
:noindex:
@@ -1596,18 +1594,20 @@ type and the argument types of the function.
15961594
.. function:: CFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
15971595

15981596
The returned function prototype creates functions that use the standard C
1599-
calling convention. The function will release the GIL during the call.
1600-
If `use_errno` is set to True, the ctypes private copy of the system `errno`
1601-
variable is exchanged with the real `errno` value bafore and after the call;
1602-
`use_last_error` does the same for the Windows error code.
1597+
calling convention. The function will release the GIL during the call. If
1598+
*use_errno* is set to True, the ctypes private copy of the system
1599+
:data:`errno` variable is exchanged with the real :data:`errno` value bafore
1600+
and after the call; *use_last_error* does the same for the Windows error
1601+
code.
16031602

16041603

16051604
.. function:: WINFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
16061605

16071606
Windows only: The returned function prototype creates functions that use the
1608-
``stdcall`` calling convention, except on Windows CE where :func:`WINFUNCTYPE`
1609-
is the same as :func:`CFUNCTYPE`. The function will release the GIL during the
1610-
call. `use_errno` and `use_last_error` have the same meaning as above.
1607+
``stdcall`` calling convention, except on Windows CE where
1608+
:func:`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`. The function will
1609+
release the GIL during the call. *use_errno* and *use_last_error* have the
1610+
same meaning as above.
16111611

16121612

16131613
.. function:: PYFUNCTYPE(restype, *argtypes)
@@ -1852,10 +1852,10 @@ Utility functions
18521852
.. function:: find_library(name)
18531853
:module: ctypes.util
18541854

1855-
Try to find a library and return a pathname. `name` is the library name without
1856-
any prefix like `lib`, suffix like ``.so``, ``.dylib`` or version number (this
1857-
is the form used for the posix linker option :option:`-l`). If no library can
1858-
be found, returns ``None``.
1855+
Try to find a library and return a pathname. *name* is the library name
1856+
without any prefix like ``lib```, suffix like ``.so``, ``.dylib`` or version
1857+
number (this is the form used for the posix linker option :option:`-l`). If
1858+
no library can be found, returns ``None``.
18591859

18601860
The exact functionality is system dependent.
18611861

@@ -1887,12 +1887,12 @@ Utility functions
18871887
.. function:: get_errno()
18881888

18891889
Returns the current value of the ctypes-private copy of the system
1890-
`errno` variable in the calling thread.
1890+
:data:`errno` variable in the calling thread.
18911891

18921892
.. function:: get_last_error()
18931893

18941894
Windows only: returns the current value of the ctypes-private copy of the system
1895-
`LastError` variable in the calling thread.
1895+
:data:`LastError` variable in the calling thread.
18961896

18971897
.. function:: memmove(dst, src, count)
18981898

@@ -1947,15 +1947,14 @@ Utility functions
19471947

19481948
.. function:: set_errno(value)
19491949

1950-
Set the current value of the ctypes-private copy of the system
1951-
`errno` variable in the calling thread to `value` and return the
1952-
previous value.
1950+
Set the current value of the ctypes-private copy of the system :data:`errno`
1951+
variable in the calling thread to *value* and return the previous value.
19531952

19541953
.. function:: set_last_error(value)
19551954

1956-
Windows only: set the current value of the ctypes-private copy of
1957-
the system `LastError` variable in the calling thread to `value`
1958-
and return the previous value.
1955+
Windows only: set the current value of the ctypes-private copy of the system
1956+
:data:`LastError` variable in the calling thread to *value* and return the
1957+
previous value.
19591958

19601959
.. function:: sizeof(obj_or_type)
19611960

Doc/library/decimal.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ In addition to the three supplied contexts, new contexts can be created with the
11141114

11151115
.. method:: logical_and(x, y)
11161116

1117-
Applies the logical operation `and` between each operand's digits.
1117+
Applies the logical operation *and* between each operand's digits.
11181118

11191119

11201120
.. method:: logical_invert(x)
@@ -1124,12 +1124,12 @@ In addition to the three supplied contexts, new contexts can be created with the
11241124

11251125
.. method:: logical_or(x, y)
11261126

1127-
Applies the logical operation `or` between each operand's digits.
1127+
Applies the logical operation *or* between each operand's digits.
11281128

11291129

11301130
.. method:: logical_xor(x, y)
11311131

1132-
Applies the logical operation `xor` between each operand's digits.
1132+
Applies the logical operation *xor* between each operand's digits.
11331133

11341134

11351135
.. method:: max(x, y)
@@ -1237,8 +1237,8 @@ In addition to the three supplied contexts, new contexts can be created with the
12371237

12381238
.. method:: remainder_near(x, y)
12391239

1240-
Returns `x - y * n`, where *n* is the integer nearest the exact value
1241-
of `x / y` (if the result is `0` then its sign will be the sign of *x*).
1240+
Returns ``x - y * n``, where *n* is the integer nearest the exact value
1241+
of ``x / y`` (if the result is 0 then its sign will be the sign of *x*).
12421242

12431243

12441244
.. method:: rotate(x, y)

Doc/library/fractions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ another rational number, or from a string.
126126

127127
.. function:: gcd(a, b)
128128

129-
Return the greatest common divisor of the integers `a` and `b`. If
130-
either `a` or `b` is nonzero, then the absolute value of `gcd(a,
131-
b)` is the largest integer that divides both `a` and `b`. `gcd(a,b)`
132-
has the same sign as `b` if `b` is nonzero; otherwise it takes the sign
133-
of `a`. `gcd(0, 0)` returns `0`.
129+
Return the greatest common divisor of the integers *a* and *b*. If either
130+
*a* or *b* is nonzero, then the absolute value of ``gcd(a, b)`` is the
131+
largest integer that divides both *a* and *b*. ``gcd(a,b)`` has the same
132+
sign as *b* if *b* is nonzero; otherwise it takes the sign of *a*. ``gcd(0,
133+
0)`` returns ``0``.
134134

135135

136136
.. seealso::

Doc/library/tempfile.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ The module defines the following user-callable functions:
149149

150150
.. warning::
151151

152-
Use of this function may introduce a security hole in your program.
153-
By the time you get around to doing anything with the file name it
154-
returns, someone else may have beaten you to the punch.
155-
:func:`mktemp` usage can be replaced easily with
156-
:func:`NamedTemporaryFile`, passing it the `delete=False` parameter::
152+
Use of this function may introduce a security hole in your program. By
153+
the time you get around to doing anything with the file name it returns,
154+
someone else may have beaten you to the punch. :func:`mktemp` usage can
155+
be replaced easily with :func:`NamedTemporaryFile`, passing it the
156+
``delete=False`` parameter::
157157

158158
>>> f = NamedTemporaryFile(delete=False)
159159
>>> f

0 commit comments

Comments
 (0)