]> granicus.if.org Git - python/commitdiff
Issue #19795: Mark up None as literal text.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 13:37:13 +0000 (16:37 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Oct 2016 13:37:13 +0000 (16:37 +0300)
32 files changed:
1  2 
Doc/c-api/unicode.rst
Doc/library/code.rst
Doc/library/collections.rst
Doc/library/dis.rst
Doc/library/http.server.rst
Doc/library/imaplib.rst
Doc/library/importlib.rst
Doc/library/json.rst
Doc/library/logging.handlers.rst
Doc/library/mmap.rst
Doc/library/multiprocessing.rst
Doc/library/os.rst
Doc/library/queue.rst
Doc/library/select.rst
Doc/library/smtplib.rst
Doc/library/socket.rst
Doc/library/sqlite3.rst
Doc/library/ssl.rst
Doc/library/stdtypes.rst
Doc/library/string.rst
Doc/library/subprocess.rst
Doc/library/sys.rst
Doc/library/test.rst
Doc/library/timeit.rst
Doc/library/typing.rst
Doc/library/unittest.mock.rst
Doc/library/unittest.rst
Doc/library/urllib.request.rst
Doc/reference/datamodel.rst
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.4.rst

Simple merge
index 4cce1fab349327ab0a898802951450efce85accf,443af699f24ff6927ad7072646b69e937790bde0..e2c47bab5a0b9173b6b123afc33787ab75c80aac
@@@ -148,10 -144,6 +148,10 @@@ interpreter objects as well as the foll
     by the class name of the console object in parentheses (so as not to confuse
     this with the real interpreter -- since it's so close!).
  
-    None, a default message is printed.
 +   The optional *exitmsg* argument specifies an exit message printed when exiting.
 +   Pass the empty string to suppress the exit message. If *exitmsg* is not given or
++   ``None``, a default message is printed.
 +
     .. versionchanged:: 3.4
        To suppress printing any banner, pass an empty string.
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 925a722f2085a53cbd9d4ec631e924b0a73dc63e,5a67f93e3c3aa13c641c4690501bd5d44b335be1..3260cdc093e10e309bb15dc6ecee32b00fa70c41
@@@ -3814,13 -3621,8 +3814,13 @@@ Miscellaneous System Informatio
  
  .. function:: cpu_count()
  
-    Return the number of CPUs in the system. Returns None if undetermined.
+    Return the number of CPUs in the system. Returns ``None`` if undetermined.
  
 +   This number is not equivalent to the number of CPUs the current process can
 +   use.  The number of usable CPUs can be obtained with
 +   ``len(os.sched_getaffinity(0))``
 +
 +
     .. versionadded:: 3.4
  
  
Simple merge
Simple merge
Simple merge
index 6909a64c37a572832659cb9adfb9516a420a773d,79c7609e54a4ba1d2059189ea096d296ed9352aa..9671857fc3793c634d77fc4397dc636d1547e066
@@@ -1387,14 -1331,11 +1387,14 @@@ to sockets
  
     Set the value of the given socket option (see the Unix manual page
     :manpage:`setsockopt(2)`).  The needed symbolic constants are defined in the
 -   :mod:`socket` module (:const:`SO_\*` etc.).  The value can be an integer or
 -   a :term:`bytes-like object` representing a buffer.  In the latter case it is
 -   up to the caller to
 -   ensure that the bytestring contains the proper bits (see the optional built-in
 -   module :mod:`struct` for a way to encode C structures as bytestrings).
 +   :mod:`socket` module (:const:`SO_\*` etc.).  The value can be an integer,
-    None or a :term:`bytes-like object` representing a buffer. In the later
++   ``None`` or a :term:`bytes-like object` representing a buffer. In the later
 +   case it is up to the caller to ensure that the bytestring contains the
 +   proper bits (see the optional built-in module :mod:`struct` for a way to
-    encode C structures as bytestrings). When value is set to None,
++   encode C structures as bytestrings). When value is set to ``None``,
 +   optlen argument is required. It's equivalent to call setsockopt C
 +   function with optval=NULL and optlen=optlen.
 +
  
     .. versionchanged:: 3.5
        Writable :term:`bytes-like object` is now accepted.
Simple merge
Simple merge
Simple merge
Simple merge
index 0655dc41185b1f863cf18ed4e2a1c9ff084965b1,615adb23a6f087aa684280a7a60523652c1ab826..773d207bcae638c8755fd34e37139ac873d59a6c
@@@ -114,8 -104,8 +114,8 @@@ compatibility with older versions, see 
     .. attribute:: stdout
  
        Captured stdout from the child process. A bytes sequence, or a string if
-       :func:`run` was called with an encoding or errors. None if stdout was not
 -      :func:`run` was called with ``universal_newlines=True``. ``None`` if stdout
 -      was not captured.
++      :func:`run` was called with an encoding or errors. ``None`` if stdout was not
 +      captured.
  
        If you ran the process with ``stderr=subprocess.STDOUT``, stdout and
        stderr will be combined in this attribute, and :attr:`stderr` will be
     .. attribute:: stderr
  
        Captured stderr from the child process. A bytes sequence, or a string if
-       :func:`run` was called with an encoding or errors. None if stderr was not
 -      :func:`run` was called with ``universal_newlines=True``. ``None`` if stderr
 -      was not captured.
++      :func:`run` was called with an encoding or errors. ``None`` if stderr was not
 +      captured.
  
     .. method:: check_returncode()
  
Simple merge
Simple merge
index 5bae33bc8f4b7663a2e396f909791f13f5aeca62,57a4834c90eec8d26917e4099bf08e8a81ca8a0f..3b772765aca2605021491e94a61d5beb3dbd4e87
@@@ -134,23 -134,6 +134,23 @@@ The module defines three convenience fu
              timeit.Timer('for i in range(10): oct(i)', 'gc.enable()').timeit()
  
  
-         If *callback* is given and is not *None*, it will be called after
 +    .. method:: Timer.autorange(callback=None)
 +
 +       Automatically determine how many times to call :meth:`.timeit`.
 +
 +       This is a convenience function that calls :meth:`.timeit` repeatedly
 +       so that the total time >= 0.2 second, returning the eventual
 +       (number of loops, time taken for that number of loops). It calls
 +       :meth:`.timeit` with *number* set to successive powers of ten (10,
 +       100, 1000, ...) up to a maximum of one billion, until the time taken
 +       is at least 0.2 second, or the maximum is reached.
 +
++        If *callback* is given and is not ``None``, it will be called after
 +        each trial with two arguments: ``callback(number, time_taken)``.
 +
 +        .. versionadded:: 3.6
 +
 +
     .. method:: Timer.repeat(repeat=3, number=1000000)
  
        Call :meth:`.timeit` a few times.
Simple merge
Simple merge
Simple merge
Simple merge
index 246e2e3140a79c45ae2b36fb722a71c30db2a983,b763f10eeb6e4fd92f1b091f07ee49eef8ac05aa..9619e53d4d970a8d4656738aad9562390b25cea2
@@@ -771,10 -767,7 +771,10 @@@ Custom classe
     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's documentation string, or ``None`` if undefined;
 +   :attr:`__annotations__` (optional) is a dictionary containing
 +   :term:`variable annotations <variable annotation>` collected during
 +   class body execution.
  
  Class instances
     .. index::
Simple merge
Simple merge
Simple merge