@@ -506,8 +506,8 @@ This produces the following output::
506
506
ZeroDivisionError: integer division or modulo by zero
507
507
508
508
Slightly more advanced programs will use a logger other than the root logger.
509
- The :func: ` getLogger(name) ` function is used to get a particular log, creating
510
- it if it doesn't exist yet. :func: ` getLogger(None) ` returns the root logger. ::
509
+ The `` getLogger(name) ` ` function is used to get a particular log, creating
510
+ it if it doesn't exist yet. `` getLogger(None) ` ` returns the root logger. ::
511
511
512
512
log = logging.getLogger('server')
513
513
...
@@ -726,10 +726,10 @@ module:
726
726
objects to it. Additional built-in and frozen modules can be imported by an
727
727
object added to this list.
728
728
729
- Importer objects must have a single method, :meth: `find_module(fullname,
730
- path=None) `. *fullname * will be a module or package name, e.g. ``string `` or
729
+ Importer objects must have a single method, ` `find_module(fullname,
730
+ path=None) `` . *fullname * will be a module or package name, e.g. ``string `` or
731
731
``distutils.core ``. :meth: `find_module ` must return a loader object that has a
732
- single method, :meth: ` load_module(fullname) `, that creates and returns the
732
+ single method, `` load_module(fullname) ` `, that creates and returns the
733
733
corresponding module object.
734
734
735
735
Pseudo-code for Python's new import logic, therefore, looks something like this
@@ -937,7 +937,7 @@ Or use slice objects directly in subscripts::
937
937
[0, 2, 4]
938
938
939
939
To simplify implementing sequences that support extended slicing, slice objects
940
- now have a method :meth: ` indices(length) ` which, given the length of a sequence,
940
+ now have a method `` indices(length) ` ` which, given the length of a sequence,
941
941
returns a ``(start, stop, step) `` tuple that can be passed directly to
942
942
:func: `range `. :meth: `indices ` handles omitted and out-of-bounds indices in a
943
943
manner consistent with regular slices (and this innocuous phrase hides a welter
@@ -986,7 +986,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
986
986
* Built-in types now support the extended slicing syntax, as described in
987
987
section :ref: `section-slices ` of this document.
988
988
989
- * A new built-in function, :func: ` sum(iterable, start=0) `, adds up the numeric
989
+ * A new built-in function, `` sum(iterable, start=0) ` `, adds up the numeric
990
990
items in the iterable object and returns their sum. :func: `sum ` only accepts
991
991
numbers, meaning that you can't use it to concatenate a bunch of strings.
992
992
(Contributed by Alex Martelli.)
@@ -1000,7 +1000,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
1000
1000
its index, now takes optional *start * and *stop * arguments to limit the search
1001
1001
to only part of the list.
1002
1002
1003
- * Dictionaries have a new method, :meth: ` pop(key[, *default*]) `, that returns
1003
+ * Dictionaries have a new method, `` pop(key[, *default*]) ` `, that returns
1004
1004
the value corresponding to *key * and removes that key/value pair from the
1005
1005
dictionary. If the requested key isn't present in the dictionary, *default * is
1006
1006
returned if it's specified and :exc: `KeyError ` raised if it isn't. ::
@@ -1022,7 +1022,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
1022
1022
{}
1023
1023
>>>
1024
1024
1025
- There's also a new class method, :meth: ` dict.fromkeys(iterable, value) `, that
1025
+ There's also a new class method, `` dict.fromkeys(iterable, value) ` `, that
1026
1026
creates a dictionary with keys taken from the supplied iterator *iterable * and
1027
1027
all values set to *value *, defaulting to ``None ``.
1028
1028
@@ -1095,7 +1095,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
1095
1095
100 bytecodes, speeding up single-threaded applications by reducing the
1096
1096
switching overhead. Some multithreaded applications may suffer slower response
1097
1097
time, but that's easily fixed by setting the limit back to a lower number using
1098
- :func: ` sys.setcheckinterval(N) `. The limit can be retrieved with the new
1098
+ `` sys.setcheckinterval(N) ` `. The limit can be retrieved with the new
1099
1099
:func: `sys.getcheckinterval ` function.
1100
1100
1101
1101
* One minor but far-reaching change is that the names of extension types defined
@@ -1274,10 +1274,10 @@ complete list of changes, or look through the CVS logs for all the details.
1274
1274
1275
1275
* Previously the :mod: `doctest ` module would only search the docstrings of
1276
1276
public methods and functions for test cases, but it now also examines private
1277
- ones as well. The :func: `DocTestSuite( ` function creates a
1277
+ ones as well. The :func: `DocTestSuite ` function creates a
1278
1278
:class: `unittest.TestSuite ` object from a set of :mod: `doctest ` tests.
1279
1279
1280
- * The new :func: ` gc.get_referents(object) ` function returns a list of all the
1280
+ * The new `` gc.get_referents(object) ` ` function returns a list of all the
1281
1281
objects referenced by *object *.
1282
1282
1283
1283
* The :mod: `getopt ` module gained a new function, :func: `gnu_getopt `, that
@@ -1349,8 +1349,8 @@ complete list of changes, or look through the CVS logs for all the details.
1349
1349
documentation for details.
1350
1350
(Contributed by Raymond Hettinger.)
1351
1351
1352
- * Two new functions in the :mod: `math ` module, :func: ` degrees(rads) ` and
1353
- :func: ` radians(degs) `, convert between radians and degrees. Other functions in
1352
+ * Two new functions in the :mod: `math ` module, `` degrees(rads) ` ` and
1353
+ `` radians(degs) ` `, convert between radians and degrees. Other functions in
1354
1354
the :mod: `math ` module such as :func: `math.sin ` and :func: `math.cos ` have always
1355
1355
required input values measured in radians. Also, an optional *base * argument
1356
1356
was added to :func: `math.log ` to make it easier to compute logarithms for bases
@@ -1407,7 +1407,7 @@ complete list of changes, or look through the CVS logs for all the details.
1407
1407
and therefore faster performance. Setting the parser object's
1408
1408
:attr: `buffer_text ` attribute to :const: `True ` will enable buffering.
1409
1409
1410
- * The :func: ` sample(population, k) ` function was added to the :mod: `random `
1410
+ * The `` sample(population, k) ` ` function was added to the :mod: `random `
1411
1411
module. *population * is a sequence or :class: `xrange ` object containing the
1412
1412
elements of a population, and :func: `sample ` chooses *k * elements from the
1413
1413
population without replacing chosen elements. *k * can be any value up to
@@ -1453,15 +1453,15 @@ complete list of changes, or look through the CVS logs for all the details.
1453
1453
encryption is not believed to be secure. If you need encryption, use one of the
1454
1454
several AES Python modules that are available separately.
1455
1455
1456
- * The :mod: `shutil ` module gained a :func: ` move(src, dest) ` function that
1456
+ * The :mod: `shutil ` module gained a `` move(src, dest) ` ` function that
1457
1457
recursively moves a file or directory to a new location.
1458
1458
1459
1459
* Support for more advanced POSIX signal handling was added to the :mod: `signal `
1460
1460
but then removed again as it proved impossible to make it work reliably across
1461
1461
platforms.
1462
1462
1463
1463
* The :mod: `socket ` module now supports timeouts. You can call the
1464
- :meth: ` settimeout(t) ` method on a socket object to set a timeout of *t * seconds.
1464
+ `` settimeout(t) ` ` method on a socket object to set a timeout of *t * seconds.
1465
1465
Subsequent socket operations that take longer than *t * seconds to complete will
1466
1466
abort and raise a :exc: `socket.timeout ` exception.
1467
1467
@@ -1482,9 +1482,9 @@ complete list of changes, or look through the CVS logs for all the details.
1482
1482
:program: `tar `\ -format archive files. (Contributed by Lars Gustäbel.)
1483
1483
1484
1484
* The new :mod: `textwrap ` module contains functions for wrapping strings
1485
- containing paragraphs of text. The :func: ` wrap(text, width) ` function takes a
1485
+ containing paragraphs of text. The `` wrap(text, width) ` ` function takes a
1486
1486
string and returns a list containing the text split into lines of no more than
1487
- the chosen width. The :func: ` fill(text, width) ` function returns a single
1487
+ the chosen width. The `` fill(text, width) ` ` function returns a single
1488
1488
string, reformatted to fit into lines no longer than the chosen width. (As you
1489
1489
can guess, :func: `fill ` is built on top of :func: `wrap `. For example::
1490
1490
@@ -1909,7 +1909,7 @@ Changes to Python's build process and to the C API include:
1909
1909
short int `, ``I `` for :c:type: `unsigned int `, and ``K `` for :c:type: `unsigned
1910
1910
long long `.
1911
1911
1912
- * A new function, :c:func: ` PyObject_DelItemString(mapping, char \ * key) ` was added
1912
+ * A new function, `` PyObject_DelItemString(mapping, char *key) ` ` was added
1913
1913
as shorthand for ``PyObject_DelItem(mapping, PyString_New(key)) ``.
1914
1914
1915
1915
* File objects now manage their internal string buffer differently, increasing
0 commit comments