]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19795: Mark up None as literal text.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 13:29:10 +0000 (16:29 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 13:29:10 +0000 (16:29 +0300)
29 files changed:
Doc/c-api/none.rst
Doc/c-api/unicode.rst
Doc/howto/descriptor.rst
Doc/howto/sorting.rst
Doc/library/argparse.rst
Doc/library/asyncore.rst
Doc/library/bdb.rst
Doc/library/collections.rst
Doc/library/doctest.rst
Doc/library/ensurepip.rst
Doc/library/formatter.rst
Doc/library/imaplib.rst
Doc/library/inspect.rst
Doc/library/json.rst
Doc/library/logging.handlers.rst
Doc/library/logging.rst
Doc/library/multiprocessing.rst
Doc/library/optparse.rst
Doc/library/queue.rst
Doc/library/select.rst
Doc/library/sqlite3.rst
Doc/library/ssl.rst
Doc/library/string.rst
Doc/library/ttk.rst
Doc/library/turtle.rst
Doc/library/unittest.rst
Doc/library/xml.etree.elementtree.rst
Doc/library/xml.sax.reader.rst
Doc/reference/datamodel.rst

index aeaca9719dc9b4211fbf3bffee7d56e55fc57f88..f8909b98ad30cc725a473f0ecaaf6789177a6239 100644 (file)
@@ -2,8 +2,8 @@
 
 .. _noneobject:
 
-The None Object
----------------
+The ``None`` Object
+-------------------
 
 .. index:: object: None
 
index 85800c5e5f82d1d4a2209383356b8dd826a020c7..7c056f4f91a73d3ee86a621c1c41a26e113bb9c0 100644 (file)
@@ -856,11 +856,11 @@ included in the :mod:`encodings` package). The codec uses mapping to encode and
 decode characters.
 
 Decoding mappings must map single string characters to single Unicode
-characters, integers (which are then interpreted as Unicode ordinals) or None
+characters, integers (which are then interpreted as Unicode ordinals) or ``None``
 (meaning "undefined mapping" and causing an error).
 
 Encoding mappings must map single Unicode characters to single string
-characters, integers (which are then interpreted as Latin-1 ordinals) or None
+characters, integers (which are then interpreted as Latin-1 ordinals) or ``None``
 (meaning "undefined mapping" and causing an error).
 
 The mapping objects provided must only support the __getitem__ mapping
@@ -917,7 +917,7 @@ The following codec API is special in that maps Unicode to Unicode.
    *NULL* when an exception was raised by the codec.
 
    The *mapping* table must map Unicode ordinal integers to Unicode ordinal
-   integers or None (causing deletion of the character).
+   integers or ``None`` (causing deletion of the character).
 
    Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries
    and sequences work well.  Unmapped character ordinals (ones which cause a
@@ -1019,7 +1019,7 @@ They all return *NULL* or ``-1`` if an exception occurs.
    resulting Unicode object.
 
    The mapping table must map Unicode ordinal integers to Unicode ordinal integers
-   or None (causing deletion of the character).
+   or ``None`` (causing deletion of the character).
 
    Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries
    and sequences work well.  Unmapped character ordinals (ones which cause a
index 8f98c4202e83b985d8912e792d9634970bac0ea1..493f6aed0e466c73e46939093feec6967cbc77ce 100644 (file)
@@ -308,7 +308,7 @@ The output suggests that bound and unbound methods are two different types.
 While they could have been implemented that way, the actual C implementation of
 :c:type:`PyMethod_Type` in :source:`Objects/classobject.c` is a single object
 with two different representations depending on whether the :attr:`im_self`
-field is set or is *NULL* (the C equivalent of *None*).
+field is set or is *NULL* (the C equivalent of ``None``).
 
 Likewise, the effects of calling a method object depend on the :attr:`im_self`
 field. If set (meaning bound), the original function (stored in the
index ac2aa31a5e19dfdd5f052af73991b527e812b041..6e3163743f559bed7a8b8c609eb96b817a6222b8 100644 (file)
@@ -24,7 +24,7 @@ returns a new sorted list::
     [1, 2, 3, 4, 5]
 
 You can also use the :meth:`list.sort` method of a list. It modifies the list
-in-place (and returns *None* to avoid confusion). Usually it's less convenient
+in-place (and returns ``None`` to avoid confusion). Usually it's less convenient
 than :func:`sorted` - but if you don't need the original list, it's slightly
 more efficient.
 
index af3489597d120e4b53c02e2a40ea6e33d359bf9c..f271d7392931df0f724af0be5c6b444afea62854 100644 (file)
@@ -1500,7 +1500,7 @@ Sub-commands
      positional arguments
 
    * description - description for the sub-parser group in help output, by
-     default None
+     default ``None``
 
    * prog - usage information that will be displayed with sub-command help,
      by default the name of the program and any positional arguments before the
@@ -1513,12 +1513,12 @@ Sub-commands
      encountered at the command line
 
    * dest_ - name of the attribute under which sub-command name will be
-     stored; by default None and no value is stored
+     stored; by default ``None`` and no value is stored
 
-   * help_ - help for sub-parser group in help output, by default None
+   * help_ - help for sub-parser group in help output, by default ``None``
 
    * metavar_ - string presenting available sub-commands in help; by default it
-     is None and presents sub-commands in form {cmd1, cmd2, ..}
+     is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}
 
    Some example usage::
 
index 31cd497f59c9ccc0bf422ec0ad4625e531af6597..282a2371c4ea97501685f14802c9238b99aa5fde 100644 (file)
@@ -51,7 +51,7 @@ any that have been added to the map during asynchronous service) is closed.
 
    Enter a polling loop that terminates after count passes or all open
    channels have been closed.  All arguments are optional.  The *count*
-   parameter defaults to None, resulting in the loop terminating only when all
+   parameter defaults to ``None``, resulting in the loop terminating only when all
    channels have been closed.  The *timeout* argument sets the timeout
    parameter for the appropriate :func:`~select.select` or :func:`~select.poll`
    call, measured in seconds; the default is 30 seconds.  The *use_poll*
index 6980353d7ad2500ca151d6772a2ff08839740ad2..d9fee21f4e65d8c513e703a8b7e560ec2417161c 100644 (file)
@@ -233,7 +233,7 @@ The :mod:`bdb` module also defines two classes:
    .. method:: set_continue()
 
       Stop only at breakpoints or when finished.  If there are no breakpoints,
-      set the system trace function to None.
+      set the system trace function to ``None``.
 
    .. method:: set_quit()
 
index 518e49029f38c22dc9b4b1f5dd118fd6cd7a8374..3c8c05fee9a5321b9e48ad9c77b7bb546e18eb5a 100644 (file)
@@ -237,7 +237,7 @@ counts, but the output will exclude results with counts of zero or less.
 
    .. versionadded:: 2.4
 
-   If *maxlen* is not specified or is *None*, deques may grow to an
+   If *maxlen* is not specified or is ``None``, deques may grow to an
    arbitrary length.  Otherwise, the deque is bounded to the specified maximum
    length.  Once a bounded length deque is full, when new items are added, a
    corresponding number of items are discarded from the opposite end.  Bounded
@@ -321,7 +321,7 @@ counts, but the output will exclude results with counts of zero or less.
 
    .. attribute:: maxlen
 
-      Maximum size of a deque or *None* if unbounded.
+      Maximum size of a deque or ``None`` if unbounded.
 
       .. versionadded:: 2.7
 
index 43be33ef9e05c9fe8d8076b9ca9b9779b7734f2e..4506805e029ad58b95c9881d47d053ecb32f3c12 100644 (file)
@@ -1273,7 +1273,7 @@ DocTest Objects
 
    .. attribute:: docstring
 
-      The string that the test was extracted from, or 'None' if the string is
+      The string that the test was extracted from, or ``None`` if the string is
       unavailable, or if the test was not extracted from a string.
 
 
@@ -1381,7 +1381,7 @@ DocTestFinder objects
       not specified, then ``obj.__name__`` is used.
 
       The optional parameter *module* is the module that contains the given object.
-      If the module is not specified or is None, then the test finder will attempt
+      If the module is not specified or is ``None``, then the test finder will attempt
       to automatically determine the correct module.  The object's module is used:
 
       * As a default namespace, if *globs* is not specified.
index 72063005c180f461d79aff81fb88082840e9e38a..a6358e44b15d96cc0b079437e74b79f6168968b3 100644 (file)
@@ -94,7 +94,7 @@ Module API
    Bootstraps ``pip`` into the current or designated environment.
 
    *root* specifies an alternative root directory to install relative to.
-   If *root* is None, then installation uses the default install location
+   If *root* is ``None``, then installation uses the default install location
    for the current environment.
 
    *upgrade* indicates whether or not to upgrade an existing installation
index e696fec3e4b9821a0f20efca6ec3261729d7a489..97739084fa7b943f1f484de9b50f5bb099adc1d6 100644 (file)
@@ -344,7 +344,7 @@ this module.  Most applications will need to derive new writer classes from the
 .. class:: DumbWriter(file=None, maxcol=72)
 
    Simple writer class which writes output on the file object passed in as *file*
-   or, if *file* is None, on standard output.  The output is simply word-wrapped
+   or, if *file* is ``None``, on standard output.  The output is simply word-wrapped
    to the number of columns specified by *maxcol*.  This class is suitable for
    reflowing a sequence of paragraphs.
 
index 20e377f618043710ce4b42ec644cfe8e84cc5f48..18f6d9dfe2ba9abd03faa7bf743453caa725ac8e 100644 (file)
@@ -90,7 +90,7 @@ The following utility functions are defined:
 
    Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local
    time.  The return value is a :class:`time.struct_time` instance or
-   None if the string has wrong format.
+   ``None`` if the string has wrong format.
 
 .. function:: Int2AP(num)
 
index c1b7bec4ff4b164453a276ec65cb22e5d018d6c6..ec23d4f09da889667a06918d399d0e140a4a15c6 100644 (file)
@@ -95,8 +95,9 @@ attributes:
 |           | gi_code         | code object               |       |
 +-----------+-----------------+---------------------------+-------+
 |           | gi_frame        | frame object or possibly  |       |
-|           |                 | None once the generator   |       |
-|           |                 | has been exhausted        |       |
+|           |                 | ``None`` once the         |       |
+|           |                 | generator has been        |       |
+|           |                 | exhausted                 |       |
 +-----------+-----------------+---------------------------+-------+
 |           | gi_running      | set to 1 when generator   |       |
 |           |                 | is executing, 0 otherwise |       |
@@ -478,7 +479,7 @@ Classes and functions
    four things is returned: ``(args, varargs, keywords, defaults)``. *args* is a
    list of the argument names (it may contain nested lists). *varargs* and
    *keywords* are the names of the ``*`` and ``**`` arguments or
-   ``None``. *defaults* is a tuple of default argument values or None if there
+   ``None``. *defaults* is a tuple of default argument values or ``None`` if there
    are no default arguments; if this tuple has *n* elements, they correspond to
    the last *n* elements listed in *args*.
 
index bf88dca31833b0b7cf24cddc261ae049acf5baaf..9e3e05e93b712957c0e5be039120738740dd05e3 100644 (file)
@@ -403,7 +403,7 @@ Encoders and Decoders
    (to raise :exc:`TypeError`).
 
    If *skipkeys* is false (the default), then it is a :exc:`TypeError` to
-   attempt encoding of keys that are not str, int, long, float or None.  If
+   attempt encoding of keys that are not str, int, long, float or ``None``.  If
    *skipkeys* is true, such items are simply skipped.
 
    If *ensure_ascii* is true (the default), all non-ASCII characters in the
index 27167f015a3347b767e15c05959d9892b37bc007..3f5ef50636a363dc398cd93a379c0a65e429d596 100644 (file)
@@ -74,7 +74,7 @@ sends logging output to a disk file.  It inherits the output functionality from
 
    Returns a new instance of the :class:`FileHandler` class. The specified file is
    opened and used as the stream for logging. If *mode* is not specified,
-   :const:`'a'` is used.  If *encoding* is not *None*, it is used to open the file
+   :const:`'a'` is used.  If *encoding* is not ``None``, it is used to open the file
    with that encoding.  If *delay* is true, then file opening is deferred until the
    first call to :meth:`emit`. By default, the file grows indefinitely.
 
@@ -154,7 +154,7 @@ for this value.
 
    Returns a new instance of the :class:`WatchedFileHandler` class. The specified
    file is opened and used as the stream for logging. If *mode* is not specified,
-   :const:`'a'` is used.  If *encoding* is not *None*, it is used to open the file
+   :const:`'a'` is used.  If *encoding* is not ``None``, it is used to open the file
    with that encoding.  If *delay* is true, then file opening is deferred until the
    first call to :meth:`emit`.  By default, the file grows indefinitely.
 
@@ -178,7 +178,7 @@ module, supports rotation of disk log files.
 
    Returns a new instance of the :class:`RotatingFileHandler` class. The specified
    file is opened and used as the stream for logging. If *mode* is not specified,
-   ``'a'`` is used.  If *encoding* is not *None*, it is used to open the file
+   ``'a'`` is used.  If *encoding* is not ``None``, it is used to open the file
    with that encoding.  If *delay* is true, then file opening is deferred until the
    first call to :meth:`emit`.  By default, the file grows indefinitely.
 
index 4f6e4e8f4fa3292e8e07dd06159ccdcafc070136..4e2948ab02821d8b1350536132b1b151cee73769 100644 (file)
@@ -588,7 +588,7 @@ wire).
    :param args: Variable data to merge into the *msg* argument to obtain the
                 event description.
    :param exc_info: An exception tuple with the current exception information,
-                    or *None* if no exception information is available.
+                    or ``None`` if no exception information is available.
    :param func: The name of the function or method from which the logging call
                 was invoked.
 
@@ -636,7 +636,7 @@ format string.
 |                |                         | (as returned by :func:`time.time`).           |
 +----------------+-------------------------+-----------------------------------------------+
 | exc_info       | You shouldn't need to   | Exception tuple (à la ``sys.exc_info``) or,   |
-|                | format this yourself.   | if no exception has occurred, *None*.         |
+|                | format this yourself.   | if no exception has occurred, ``None``.         |
 +----------------+-------------------------+-----------------------------------------------+
 | filename       | ``%(filename)s``        | Filename portion of ``pathname``.             |
 +----------------+-------------------------+-----------------------------------------------+
@@ -1026,4 +1026,14 @@ with the :mod:`warnings` module.
       package available from this site is suitable for use with Python 1.5.2, 2.1.x
       and 2.2.x, which do not include the :mod:`logging` package in the standard
       library.
-
+<<<<<<<
+
+=======
+      :lno: The line number in the file where the logging call was made.
+      :msg: The logging message.
+      :args: The arguments for the logging message.
+      :exc_info: An exception tuple, or ``None``.
+      :func: The name of the function or method which invoked the logging
+             call.
+      :sinfo: A stack traceback such as is provided by
+>>>>>>>
index e33f85f1601594cfa2e814cff83c60b0fbd6b9ab..b393ad134511912679a3be34ce66d04011a3892d 100644 (file)
@@ -1800,7 +1800,7 @@ with the :class:`Pool` class.
    .. versionadded:: 2.7
       *maxtasksperchild* is the number of tasks a worker process can complete
       before it will exit and be replaced with a fresh worker process, to enable
-      unused resources to be freed. The default *maxtasksperchild* is None, which
+      unused resources to be freed. The default *maxtasksperchild* is ``None``, which
       means worker processes will live as long as the pool.
 
    .. note::
@@ -2017,7 +2017,7 @@ authentication* using the :mod:`hmac` module.
    ``None`` then digest authentication is used.
 
    If *authkey* is a string then it will be used as the authentication key;
-   otherwise it must be *None*.
+   otherwise it must be ``None``.
 
    If *authkey* is ``None`` and *authenticate* is ``True`` then
    ``current_process().authkey`` is used as the authentication key.  If
index 54664622b5bbcb452eb4a16e09f2218e6296a01b..4af75a101479598dc1f48c0b02d7cbd0b39355fa 100644 (file)
@@ -2028,12 +2028,12 @@ Features of note:
 
      values.ensure_value(attr, value)
 
-  If the ``attr`` attribute of ``values`` doesn't exist or is None, then
+  If the ``attr`` attribute of ``values`` doesn't exist or is ``None``, then
   ensure_value() first sets it to ``value``, and then returns 'value. This is
   very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all
   of which accumulate data in a variable and expect that variable to be of a
   certain type (a list for the first two, an integer for the latter).  Using
   :meth:`ensure_value` means that scripts using your action don't have to worry
   about setting a default value for the option destinations in question; they
-  can just leave the default as None and :meth:`ensure_value` will take care of
+  can just leave the default as ``None`` and :meth:`ensure_value` will take care of
   getting it right when it's needed.
index b52570550da635f29b9448a0b441950568f5d602..4dd9e4678fcfa95386dc648f4bbafe7a1066cdc6 100644 (file)
@@ -113,7 +113,7 @@ provide the public methods described below.
 .. method:: Queue.put(item[, block[, timeout]])
 
    Put *item* into the queue. If optional args *block* is true and *timeout* is
-   None (the default), block if necessary until a free slot is available. If
+   ``None`` (the default), block if necessary until a free slot is available. If
    *timeout* is a positive number, it blocks at most *timeout* seconds and raises
    the :exc:`Full` exception if no free slot was available within that time.
    Otherwise (*block* is false), put an item on the queue if a free slot is
@@ -132,7 +132,7 @@ provide the public methods described below.
 .. method:: Queue.get([block[, timeout]])
 
    Remove and return an item from the queue. If optional args *block* is true and
-   *timeout* is None (the default), block if necessary until an item is available.
+   *timeout* is ``None`` (the default), block if necessary until an item is available.
    If *timeout* is a positive number, it blocks at most *timeout* seconds and
    raises the :exc:`Empty` exception if no item was available within that time.
    Otherwise (*block* is false), return an item if one is immediately available,
index ad7deecc1e23d4c287daff02c163972210650525..7a080457a05e984e4cc7463652ad61b5beccca72 100644 (file)
@@ -295,7 +295,7 @@ Kqueue Objects
 
    Low level interface to kevent
 
-   - changelist must be an iterable of kevent object or None
+   - changelist must be an iterable of kevent object or ``None``
    - max_events must be 0 or a positive integer
    - timeout in seconds (floats possible)
 
index 6b13172042b56f5cee6619310b150fefb07f7ab7..bd5dd1469158064a7cdffa8b2d172b554e98c6a9 100644 (file)
@@ -308,7 +308,7 @@ Connection Objects
       as the SQL function.
 
       The function can return any of the types supported by SQLite: unicode, str, int,
-      long, float, buffer and None.
+      long, float, buffer and ``None``.
 
       Example:
 
@@ -324,7 +324,7 @@ Connection Objects
       final result of the aggregate.
 
       The ``finalize`` method can return any of the types supported by SQLite:
-      unicode, str, int, long, float, buffer and None.
+      unicode, str, int, long, float, buffer and ``None``.
 
       Example:
 
@@ -346,7 +346,7 @@ Connection Objects
 
       .. literalinclude:: ../includes/sqlite3/collation_reverse.py
 
-      To remove a collation, call ``create_collation`` with None as callable::
+      To remove a collation, call ``create_collation`` with ``None`` as callable::
 
          con.create_collation("reverse", None)
 
@@ -868,7 +868,7 @@ You can control which kind of ``BEGIN`` statements sqlite3 implicitly executes
 (or none at all) via the *isolation_level* parameter to the :func:`connect`
 call, or via the :attr:`isolation_level` property of connections.
 
-If you want **autocommit mode**, then set :attr:`isolation_level` to None.
+If you want **autocommit mode**, then set :attr:`isolation_level` to ``None``.
 
 Otherwise leave it at its default, which will result in a plain "BEGIN"
 statement, or set it to one of SQLite's supported isolation levels: "DEFERRED",
index 5812af8f874bd2f979e835feea69bf2a653b5c66..130248759ecfe974ca70aef1027ab35e9fce31bb 100644 (file)
@@ -449,8 +449,8 @@ Certificate handling
    :meth:`SSLContext.set_default_verify_paths`. The return value is a
    :term:`named tuple` ``DefaultVerifyPaths``:
 
-   * :attr:`cafile` - resolved path to cafile or None if the file doesn't exist,
-   * :attr:`capath` - resolved path to capath or None if the directory doesn't exist,
+   * :attr:`cafile` - resolved path to cafile or ``None`` if the file doesn't exist,
+   * :attr:`capath` - resolved path to capath or ``None`` if the directory doesn't exist,
    * :attr:`openssl_cafile_env` - OpenSSL's environment key that points to a cafile,
    * :attr:`openssl_cafile` - hard coded path to a cafile,
    * :attr:`openssl_capath_env` - OpenSSL's environment key that points to a capath,
index 55733b98c3be3ee8d14fffef9217f177af3c22aa..c2af446619e31d46e147be0c0850337c4ad7adc0 100644 (file)
@@ -448,7 +448,7 @@ The available integer presentation types are:
 
 In addition to the above presentation types, integers can be formatted
 with the floating point presentation types listed below (except
-``'n'`` and None). When doing so, :func:`float` is used to convert the
+``'n'`` and ``None``). When doing so, :func:`float` is used to convert the
 integer to a floating point number before formatting.
 
 The available presentation types for floating point and decimal values are:
index c458e739c4f2fd265610ac363685a470ce5d5025..37463ca0689e1079630b04bc935d9a6298241a50 100644 (file)
@@ -1380,7 +1380,7 @@ option. If the class name of a widget is unknown, use the method
 Layouts
 ^^^^^^^
 
-A layout can be just None, if it takes no options, or a dict of
+A layout can be just ``None``, if it takes no options, or a dict of
 options specifying how to arrange the element. The layout mechanism
 uses a simplified version of the pack geometry manager: given an
 initial cavity, each element is allocated a parcel. Valid
index 01da6a073401f92c2c7d3354652d129a356b3cea..ca4f37e478f2ef8759192205f324b44b168e92a5 100644 (file)
@@ -529,7 +529,7 @@ Turtle motion
 
    :param n: an integer (or ``None``)
 
-   Delete all or first/last *n* of turtle's stamps.  If *n* is None, delete
+   Delete all or first/last *n* of turtle's stamps.  If *n* is ``None``, delete
    all stamps, if *n* > 0 delete first *n* stamps, else if *n* < 0 delete
    last *n* stamps.
 
@@ -1857,10 +1857,10 @@ Methods specific to Screen, not inherited from TurtleScreen
    :param height: if an integer, the height in pixels, if a float, a fraction of
                   the screen; default is 75% of screen
    :param startx: if positive, starting position in pixels from the left
-                  edge of the screen, if negative from the right edge, if None,
+                  edge of the screen, if negative from the right edge, if ``None``,
                   center window horizontally
    :param starty: if positive, starting position in pixels from the top
-                  edge of the screen, if negative from the bottom edge, if None,
+                  edge of the screen, if negative from the bottom edge, if ``None``,
                   center window vertically
 
    .. doctest::
index 64a1834784ce77974ef02e7c0c4c431ce12643ec..b0eaae68a70230315c31294551473e5c473f0b76 100644 (file)
@@ -878,7 +878,7 @@ Test cases
    .. method:: assertIsNone(expr, msg=None)
                assertIsNotNone(expr, msg=None)
 
-      Test that *expr* is (or is not) None.
+      Test that *expr* is (or is not) ``None``.
 
       .. versionadded:: 2.7
 
@@ -1240,7 +1240,7 @@ Test cases
       methods that delegate to it), :meth:`assertDictEqual` and
       :meth:`assertMultiLineEqual`.
 
-      Setting ``maxDiff`` to None means that there is no maximum length of
+      Setting ``maxDiff`` to ``None`` means that there is no maximum length of
       diffs.
 
       .. versionadded:: 2.7
index 20cfc4c9d33e8d716996317cc6f9c4016e49a0b1..a431b0fa22ed2e9a4c1dcbbae2880740c2fa0060 100644 (file)
@@ -639,7 +639,7 @@ Element Objects
    .. method:: clear()
 
       Resets an element.  This function removes all subelements, clears all
-      attributes, and sets the text and tail attributes to None.
+      attributes, and sets the text and tail attributes to ``None``.
 
 
    .. method:: get(key, default=None)
@@ -855,8 +855,8 @@ ElementTree Objects
       Writes the element tree to a file, as XML.  *file* is a file name, or a
       file object opened for writing.  *encoding* [1]_ is the output encoding
       (default is US-ASCII).  *xml_declaration* controls if an XML declaration
-      should be added to the file.  Use False for never, True for always, None
-      for only if not US-ASCII or UTF-8 (default is None).  *default_namespace*
+      should be added to the file.  Use False for never, True for always, ``None``
+      for only if not US-ASCII or UTF-8 (default is ``None``).  *default_namespace*
       sets the default XML namespace (for "xmlns").  *method* is either
       ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).  Returns an
       encoded string.
index 14af0508af426b05e8c66e2c2432eed15091297a..17aa8f0571597e73f39fa9106bb8cedf9449d462 100644 (file)
@@ -306,7 +306,7 @@ InputSource Objects
    Get the byte stream for this input source.
 
    The getEncoding method will return the character encoding for this byte stream,
-   or None if unknown.
+   or ``None`` if unknown.
 
 
 .. method:: InputSource.setCharacterStream(charfile)
index 3f3b30f4deaebfc1dc397cea8f95b18cde3e959b..81206ce2d3a8cae685fd019f374b528b0735361b 100644 (file)
@@ -830,7 +830,7 @@ Classes
    dictionary containing the class's namespace; :attr:`~class.__bases__` is a
    tuple (possibly empty or a singleton) containing the base classes, in the
    order of their occurrence in the base class list; :attr:`__doc__` is the
-   class's documentation string, or None if undefined.
+   class's documentation string, or ``None`` if undefined.
 
 Class instances
    .. index::
@@ -1013,7 +1013,7 @@ Internal types
       called at the start of each source code line (this is used by the debugger);
       :attr:`f_exc_type`, :attr:`f_exc_value`, :attr:`f_exc_traceback` represent the
       last exception raised in the parent frame provided another exception was ever
-      raised in the current frame (in all other cases they are None); :attr:`f_lineno`
+      raised in the current frame (in all other cases they are ``None``); :attr:`f_lineno`
       is the current line number of the frame --- writing to this from within a trace
       function jumps to the given line (only for the bottom-most frame).  A debugger
       can implement a Jump command (aka Set Next Statement) by writing to f_lineno.