diff --git a/Doc/library/_winreg.rst b/Doc/library/_winreg.rst --- a/Doc/library/_winreg.rst +++ b/Doc/library/_winreg.rst @@ -673,7 +673,7 @@ detached). The object also support comparison semantics, so handle objects will compare -true if they both reference the same underlying Windows handle value. +``True`` if they both reference the same underlying Windows handle value. Handle objects can be converted to an integer (e.g., using the built-in :func:`int` function), in which case the underlying Windows handle value is diff --git a/Doc/library/aetools.rst b/Doc/library/aetools.rst --- a/Doc/library/aetools.rst +++ b/Doc/library/aetools.rst @@ -69,7 +69,7 @@ Base class for the proxy used to talk to an application. ``signature`` overrides the class attribute ``_signature`` (which is usually set by subclasses) and is the 4-char creator code defining the application to talk to. ``start`` can be - set to true to enable running the application on class instantiation. + set to ``True`` to enable running the application on class instantiation. ``timeout`` can be specified to change the default timeout used while waiting for an AppleEvent reply. diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -685,7 +685,7 @@ * ``'store_true'`` and ``'store_false'`` - These are special cases of ``'store_const'`` using for storing the values ``True`` and ``False`` - respectively. In addition, they create default values of *False* and *True* + respectively. In addition, they create default values of ``False`` and ``True`` respectively. For example:: >>> parser = argparse.ArgumentParser() diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -144,7 +144,7 @@ Return the docstring of the given *node* (which must be a :class:`FunctionDef`, :class:`ClassDef` or :class:`Module` node), or ``None`` - if it has no docstring. If *clean* is true, clean up the docstring's + if it has no docstring. If *clean* is ``True``, clean up the docstring's indentation with :func:`inspect.cleandoc`. @@ -257,6 +257,6 @@ Return a formatted dump of the tree in *node*. This is mainly useful for debugging purposes. The returned string will show the names and the values for fields. This makes the code impossible to evaluate, so if evaluation is - wanted *annotate_fields* must be set to False. Attributes such as line + wanted *annotate_fields* must be set to ``False``. Attributes such as line numbers and column offsets are not dumped by default. If this is wanted, *include_attributes* can be set to ``True``. diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -51,10 +51,10 @@ 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` or :func:`poll` call, measured - in seconds; the default is 30 seconds. The *use_poll* parameter, if true, + in seconds; the default is 30 seconds. The *use_poll* parameter, if ``True``, indicates that :func:`poll` should be used in preference to :func:`select` (the default is ``False``). diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -283,7 +283,7 @@ """ This assumes that keep_running() is a function of no arguments which is tested initially and after each request. If its return value - is true, the server continues. + is True, the server continues. """ server_address = ('', 8000) httpd = server_class(server_address, handler_class) diff --git a/Doc/library/bastion.rst b/Doc/library/bastion.rst --- a/Doc/library/bastion.rst +++ b/Doc/library/bastion.rst @@ -42,8 +42,8 @@ raised. If present, *filter* must be a function that accepts a string containing an - attribute name, and returns true if access to that attribute will be permitted; - if *filter* returns false, the access is denied. The default filter denies + attribute name, and returns ``True`` if access to that attribute will be permitted; + if *filter* returns ``False``, the access is denied. The default filter denies access to any function beginning with an underscore (``'_'``). The bastion's string representation will be ```` if a value for *name* is provided; otherwise, ``repr(object)`` will be used. diff --git a/Doc/library/bdb.rst b/Doc/library/bdb.rst --- a/Doc/library/bdb.rst +++ b/Doc/library/bdb.rst @@ -186,17 +186,17 @@ .. method:: user_line(frame) This method is called from :meth:`dispatch_line` when either - :meth:`stop_here` or :meth:`break_here` yields True. + :meth:`stop_here` or :meth:`break_here` yields ``True``. .. method:: user_return(frame, return_value) This method is called from :meth:`dispatch_return` when :meth:`stop_here` - yields True. + yields ``True``. .. method:: user_exception(frame, exc_info) This method is called from :meth:`dispatch_exception` when - :meth:`stop_here` yields True. + :meth:`stop_here` yields ``True``. .. method:: do_clear(arg) @@ -233,11 +233,11 @@ .. 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() - Set the :attr:`quitting` attribute to True. This raises :exc:`BdbQuit` in + Set the :attr:`quitting` attribute to ``True``. This raises :exc:`BdbQuit` in the next call to one of the :meth:`dispatch_\*` methods. diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@ -53,18 +53,18 @@ Convert a block of quoted-printable data back to binary and return the binary data. More than one line may be passed at a time. If the optional argument - *header* is present and true, underscores will be decoded as spaces. + *header* is present and ``True``, underscores will be decoded as spaces. .. function:: b2a_qp(data[, quotetabs, istext, header]) Convert binary data to a line(s) of ASCII characters in quoted-printable encoding. The return value is the converted line(s). If the optional argument - *quotetabs* is present and true, all tabs and spaces will be encoded. If the - optional argument *istext* is present and true, newlines are not encoded but + *quotetabs* is present and ``True``, all tabs and spaces will be encoded. If the + optional argument *istext* is present and ``True``, newlines are not encoded but trailing whitespace will be encoded. If the optional argument *header* is - present and true, spaces will be encoded as underscores per RFC1522. If the - optional argument *header* is present and false, newline characters will be + present and ``True``, spaces will be encoded as underscores per RFC1522. If the + optional argument *header* is present and ``False``, newline characters will be encoded as well; otherwise linefeed conversion might corrupt the binary data stream. diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -81,7 +81,7 @@ .. method:: close() - Close the file. Sets data attribute :attr:`closed` to true. A closed file + Close the file. Sets data attribute :attr:`closed` to ``True``. A closed file cannot be used for further I/O operations. :meth:`close` may be called more than once without error. diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst --- a/Doc/library/calendar.rst +++ b/Doc/library/calendar.rst @@ -157,7 +157,7 @@ .. method:: formatmonth(theyear, themonth[, withyear]) - Return a month's calendar as an HTML table. If *withyear* is true the year + Return a month's calendar as an HTML table. If *withyear* is ``True`` the year will be included in the header, otherwise just the month name will be used. diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -99,7 +99,7 @@ It allows membership testing with the :keyword:`in` operator, and also supports the standard dictionary method :meth:`keys` and the built-in function :func:`len`. Form fields containing empty strings are ignored and do not appear -in the dictionary; to keep such values, provide a true value for the optional +in the dictionary; to keep such values, provide a ``True`` value for the optional *keep_blank_values* keyword parameter when creating the :class:`FieldStorage` instance. @@ -352,7 +352,7 @@ Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe sequences. Use this if you need to display text that might contain such - characters in HTML. If the optional flag *quote* is true, the quotation mark + characters in HTML. If the optional flag *quote* is ``True``, the quotation mark character (``"``) is also translated; this helps for inclusion in an HTML attribute value delimited by double quotes, as in ````. Note that single quotes are never translated. diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst --- a/Doc/library/chunk.rst +++ b/Doc/library/chunk.rst @@ -58,13 +58,13 @@ only method that is needed is :meth:`read`. If the methods :meth:`seek` and :meth:`tell` are present and don't raise an exception, they are also used. If these methods are present and raise an exception, they are expected to not - have altered the object. If the optional argument *align* is true, chunks - are assumed to be aligned on 2-byte boundaries. If *align* is false, no - alignment is assumed. The default value is true. If the optional argument - *bigendian* is false, the chunk size is assumed to be in little-endian order. - This is needed for WAVE audio files. The default value is true. If the - optional argument *inclheader* is true, the size given in the chunk header - includes the size of the header. The default value is false. + have altered the object. If the optional argument *align* is ``True``, chunks + are assumed to be aligned on 2-byte boundaries. If *align* is ``False``, no + alignment is assumed. The default value is ``True``. If the optional argument + *bigendian* is ``False``, the chunk size is assumed to be in little-endian order. + This is needed for WAVE audio files. The default value is ``True``. If the + optional argument *inclheader* is ``True``, the size given in the chunk header + includes the size of the header. The default value is ``False``. A :class:`Chunk` object supports the following methods: diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst --- a/Doc/library/cmath.rst +++ b/Doc/library/cmath.rst @@ -207,7 +207,7 @@ .. function:: isinf(x) - Return *True* if the real or the imaginary part of x is positive + Return ``True`` if the real or the imaginary part of x is positive or negative infinity. .. versionadded:: 2.6 @@ -215,7 +215,7 @@ .. function:: isnan(x) - Return *True* if the real or imaginary part of x is not a number (NaN). + Return ``True`` if the real or imaginary part of x is not a number (NaN). .. versionadded:: 2.6 diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst --- a/Doc/library/cmd.rst +++ b/Doc/library/cmd.rst @@ -69,7 +69,7 @@ special case, a line beginning with the character ``'!'`` is dispatched to the method :meth:`do_shell` (if such a method is defined). - This method will return when the :meth:`postcmd` method returns a true value. + This method will return when the :meth:`postcmd` method returns a ``True`` value. The *stop* argument to :meth:`postcmd` is the return value from the command's corresponding :meth:`do_\*` method. @@ -137,7 +137,7 @@ execution will be terminated after the call to :meth:`postcmd`; this will be the return value of the :meth:`onecmd` method. The return value of this method will be used as the new value for the internal flag which corresponds to *stop*; - returning false will cause interpretation to continue. + returning ``False`` will cause interpretation to continue. .. method:: Cmd.preloop() @@ -202,8 +202,8 @@ .. attribute:: Cmd.use_rawinput - A flag, defaulting to true. If true, :meth:`cmdloop` uses :func:`raw_input` to - display a prompt and read the next command; if false, :meth:`sys.stdout.write` + A flag, defaulting to ``True``. If ``True``, :meth:`cmdloop` uses :func:`raw_input` to + display a prompt and read the next command; if ``False``, :meth:`sys.stdout.write` and :meth:`sys.stdin.readline` are used. (This means that by importing :mod:`readline`, on systems that support it, the interpreter will automatically support :program:`Emacs`\ -like line editing and command-history keystrokes.) diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -450,7 +450,7 @@ Encodes *object* (taking the current state of the encoder into account) and returns the resulting encoded object. If this is the last call to - :meth:`encode` *final* must be true (the default is false). + :meth:`encode` *final* must be ``True`` (the default is ``False``). .. method:: reset() @@ -498,8 +498,8 @@ Decodes *object* (taking the current state of the decoder into account) and returns the resulting decoded object. If this is the last call to - :meth:`decode` *final* must be true (the default is false). If *final* is - true the decoder must decode the input completely and must flush all + :meth:`decode` *final* must be ``True`` (the default is ``False``). If *final* is + ``True`` the decoder must decode the input completely and must flush all buffers. If this isn't possible (e.g. because of incomplete byte sequences at the end of the input) it must initiate error handling just like in the stateless case (which might raise an exception). @@ -653,7 +653,7 @@ *size*, if given, is passed as size argument to the stream's :meth:`readline` method. - If *keepends* is false line-endings will be stripped from the lines + If *keepends* is ``False`` line-endings will be stripped from the lines returned. .. versionchanged:: 2.4 @@ -666,7 +666,7 @@ lines. Line-endings are implemented using the codec's decoder method and are - included in the list entries if *keepends* is true. + included in the list entries if *keepends* is ``True``. *sizehint*, if given, is passed as the *size* argument to the stream's :meth:`read` method. @@ -1226,13 +1226,13 @@ .. function:: nameprep(label) Return the nameprepped version of *label*. The implementation currently assumes - query strings, so ``AllowUnassigned`` is true. + query strings, so ``AllowUnassigned`` is ``True``. .. function:: ToASCII(label) Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` is - assumed to be false. + assumed to be ``False``. .. function:: ToUnicode(label) diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -238,7 +238,7 @@ .. 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 @@ -322,7 +322,7 @@ .. attribute:: maxlen - Maximum size of a deque or *None* if unbounded. + Maximum size of a deque or ``None`` if unbounded. .. versionadded:: 2.7 @@ -580,12 +580,12 @@ a :mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, *print*, or *raise*. - If *rename* is true, invalid fieldnames are automatically replaced + If *rename* is ``True``, invalid fieldnames are automatically replaced with positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is converted to ``['abc', '_1', 'ghi', '_3']``, eliminating the keyword ``def`` and the duplicate fieldname ``abc``. - If *verbose* is true, the class definition is printed just before being built. + If *verbose* is ``True``, the class definition is printed just before being built. Named tuple instances do not have per-instance dictionaries, so they are lightweight and require no more memory than regular tuples. @@ -806,7 +806,7 @@ The :meth:`popitem` method for ordered dictionaries returns and removes a (key, value) pair. The pairs are returned in LIFO order if *last* is - true or FIFO order if false. + ``True`` or FIFO order if ``False``. In addition to the usual mapping methods, ordered dictionaries also support reverse iteration using :func:`reversed`. diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -79,14 +79,14 @@ cases where the source file does not exist at the time the byte-code file is executed. - If *force* is true, modules are re-compiled even if the timestamps are up to + If *force* is ``True``, modules are re-compiled even if the timestamps are up to date. If *rx* is given, its search method is called on the complete path to each - file considered for compilation, and if it returns a true value, the file + file considered for compilation, and if it returns a ``True`` value, the file is skipped. - If *quiet* is true, nothing is printed to the standard output unless errors + If *quiet* is ``True``, nothing is printed to the standard output unless errors occur. @@ -101,10 +101,10 @@ executed. If *rx* is given, its search method is passed the full path name to the - file being compiled, and if it returns a true value, the file is not + file being compiled, and if it returns a ``True`` value, the file is not compiled and ``True`` is returned. - If *quiet* is true, nothing is printed to the standard output unless errors + If *quiet* is ``True``, nothing is printed to the standard output unless errors occur. .. versionadded:: 2.7 @@ -113,7 +113,7 @@ .. function:: compile_path([skip_curdir[, maxlevels[, force]]]) Byte-compile all the :file:`.py` files found along ``sys.path``. If - *skip_curdir* is true (the default), the current directory is not included + *skip_curdir* is ``True`` (the default), the current directory is not included in the search. All other parameters are passed to the :func:`compile_dir` function. Note that unlike the other compile functions, ``maxlevels`` defaults to ``0``. diff --git a/Doc/library/compiler.rst b/Doc/library/compiler.rst --- a/Doc/library/compiler.rst +++ b/Doc/library/compiler.rst @@ -198,7 +198,7 @@ consequent body pairs. There is one pair for each :keyword:`if`/:keyword:`elif` clause. The first element of the pair is the test expression. The second elements is a :class:`Stmt` node that contains the code to execute if the test -is true. +is ``True``. The :meth:`getChildren` method of :class:`If` returns a flat list of child nodes. If there are three :keyword:`if`/:keyword:`elif` clauses and no diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -90,7 +90,7 @@ into the dictionary of intrinsic defaults. When *dict_type* is given, it will be used to create the dictionary objects for the list of sections, for the options within a section, and for the default values. When *allow_no_value* - is true (default: ``False``), options without values are accepted; the value + is ``True`` (default: ``False``), options without values are accepted; the value presented for these is ``None``. This class does not @@ -215,7 +215,7 @@ .. data:: MAX_INTERPOLATION_DEPTH The maximum depth for recursive interpolation for :meth:`get` when the *raw* - parameter is false. This is relevant only for the :class:`ConfigParser` class. + parameter is ``False``. This is relevant only for the :class:`ConfigParser` class. .. seealso:: @@ -339,7 +339,7 @@ If the given section exists, set the given option to the specified value; otherwise raise :exc:`NoSectionError`. While it is possible to use :class:`RawConfigParser` (or :class:`ConfigParser` with *raw* parameters set to - true) for *internal* storage of non-string values, full functionality (including + ``True``) for *internal* storage of non-string values, full functionality (including interpolation and output to files) can only be achieved using string values. .. versionadded:: 1.6 @@ -405,7 +405,7 @@ *section*, and in *defaults* in that order. All the ``'%'`` interpolations are expanded in the return values, unless the - *raw* argument is true. Values for interpolation keys are looked up in the + *raw* argument is ``True``. Values for interpolation keys are looked up in the same manner as the option. .. method:: ConfigParser.items(section[, raw[, vars]]) diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -43,7 +43,7 @@ .. data:: __debug__ - This constant is true if Python was not started with an :option:`-O` option. + This constant is ``True`` if Python was not started with an :option:`-O` option. See also the :keyword:`assert` statement. diff --git a/Doc/library/cookielib.rst b/Doc/library/cookielib.rst --- a/Doc/library/cookielib.rst +++ b/Doc/library/cookielib.rst @@ -98,7 +98,7 @@ Netscape and RFC 2965 cookies. By default, RFC 2109 cookies (ie. cookies received in a :mailheader:`Set-Cookie` header with a version cookie-attribute of 1) are treated according to the RFC 2965 rules. However, if RFC 2965 handling - is turned off or :attr:`rfc2109_as_netscape` is True, RFC 2109 cookies are + is turned off or :attr:`rfc2109_as_netscape` is ``True``, RFC 2109 cookies are 'downgraded' by the :class:`CookieJar` instance to Netscape cookies, by setting the :attr:`version` attribute of the :class:`Cookie` instance to 0. :class:`DefaultCookiePolicy` also provides some parameters to allow some @@ -156,7 +156,7 @@ Add correct :mailheader:`Cookie` header to *request*. If policy allows (ie. the :attr:`rfc2965` and :attr:`hide_cookie2` attributes of - the :class:`CookieJar`'s :class:`CookiePolicy` instance are true and false + the :class:`CookieJar`'s :class:`CookiePolicy` instance are ``True`` and ``False`` respectively), the :mailheader:`Cookie2` header is also added when appropriate. The *request* object (usually a :class:`urllib2.Request` instance) must support @@ -228,13 +228,13 @@ Discard all session cookies. - Discards all contained cookies that have a true :attr:`discard` attribute + Discards all contained cookies that have a ``True`` :attr:`discard` attribute (usually because they had either no ``max-age`` or ``expires`` cookie-attribute, or an explicit ``discard`` cookie-attribute). For interactive browsers, the end of a session usually corresponds to closing the browser window. Note that the :meth:`save` method won't save session cookies anyway, unless you - ask otherwise by passing a true *ignore_discard* argument. + ask otherwise by passing a ``True`` *ignore_discard* argument. :class:`FileCookieJar` implements the following additional methods: @@ -295,7 +295,7 @@ .. attribute:: FileCookieJar.delayload - If true, load cookies lazily from disk. This attribute should not be assigned + If ``True``, load cookies lazily from disk. This attribute should not be assigned to. This is only a hint, since this only affects performance, not behaviour (unless the cookies on disk are changing). A :class:`CookieJar` object may ignore it. None of the :class:`FileCookieJar` classes included in the standard @@ -372,17 +372,17 @@ .. method:: CookiePolicy.domain_return_ok(domain, request) - Return false if cookies should not be returned, given cookie domain. + Return ``False`` if cookies should not be returned, given cookie domain. This method is an optimization. It removes the need for checking every cookie with a particular domain (which might involve reading many files). Returning - true from :meth:`domain_return_ok` and :meth:`path_return_ok` leaves all the + ``True`` from :meth:`domain_return_ok` and :meth:`path_return_ok` leaves all the work to :meth:`return_ok`. - If :meth:`domain_return_ok` returns true for the cookie domain, + If :meth:`domain_return_ok` returns ``True`` for the cookie domain, :meth:`path_return_ok` is called for the cookie path. Otherwise, :meth:`path_return_ok` and :meth:`return_ok` are never called for that cookie - domain. If :meth:`path_return_ok` returns true, :meth:`return_ok` is called + domain. If :meth:`path_return_ok` returns ``True``, :meth:`return_ok` is called with the :class:`Cookie` object itself for a full check. Otherwise, :meth:`return_ok` is never called for that cookie path. @@ -396,7 +396,7 @@ .. method:: CookiePolicy.path_return_ok(path, request) - Return false if cookies should not be returned, given cookie path. + Return ``False`` if cookies should not be returned, given cookie path. See the documentation for :meth:`domain_return_ok`. @@ -513,7 +513,7 @@ .. attribute:: DefaultCookiePolicy.rfc2109_as_netscape - If true, request that the :class:`CookieJar` instance downgrade RFC 2109 cookies + If ``True``, request that the :class:`CookieJar` instance downgrade RFC 2109 cookies (ie. cookies received in a :mailheader:`Set-Cookie` header with a version cookie-attribute of 1) to Netscape cookies by setting the version attribute of the :class:`Cookie` instance to 0. The default value is :const:`None`, in which @@ -538,7 +538,7 @@ Follow RFC 2965 rules on unverifiable transactions (usually, an unverifiable transaction is one resulting from a redirect or a request for an image hosted on - another site). If this is false, cookies are *never* blocked on the basis of + another site). If this is ``False``, cookies are *never* blocked on the basis of verifiability Netscape protocol strictness switches: @@ -652,7 +652,7 @@ .. attribute:: Cookie.secure - True if cookie should only be returned over a secure connection. + ``True`` if cookie should only be returned over a secure connection. .. attribute:: Cookie.expires @@ -663,7 +663,7 @@ .. attribute:: Cookie.discard - True if this is a session cookie. + ``True`` if this is a session cookie. .. attribute:: Cookie.comment @@ -680,7 +680,7 @@ .. attribute:: Cookie.rfc2109 - True if this cookie was received as an RFC 2109 cookie (ie. the cookie + ``True`` if this cookie was received as an RFC 2109 cookie (ie. the cookie arrived in a :mailheader:`Set-Cookie` header, and the value of the Version cookie-attribute in that header was 1). This attribute is provided because :mod:`cookielib` may 'downgrade' RFC 2109 cookies to Netscape cookies, in @@ -691,18 +691,18 @@ .. attribute:: Cookie.port_specified - True if a port or set of ports was explicitly specified by the server (in the + ``True`` if a port or set of ports was explicitly specified by the server (in the :mailheader:`Set-Cookie` / :mailheader:`Set-Cookie2` header). .. attribute:: Cookie.domain_specified - True if a domain was explicitly specified by the server. + ``True`` if a domain was explicitly specified by the server. .. attribute:: Cookie.domain_initial_dot - True if the domain explicitly specified by the server began with a dot + ``True`` if the domain explicitly specified by the server began with a dot (``'.'``). Cookies may have additional non-standard cookie-attributes. These may be @@ -711,7 +711,7 @@ .. method:: Cookie.has_nonstandard_attr(name) - Return true if cookie has the named cookie-attribute. + Return ``True`` if cookie has the named cookie-attribute. .. method:: Cookie.get_nonstandard_attr(name, default=None) @@ -729,7 +729,7 @@ .. method:: Cookie.is_expired([now=None]) - True if cookie has passed the time at which the server requested it should + ``True`` if cookie has passed the time at which the server requested it should expire. If *now* is given (in seconds since the epoch), return whether the cookie has expired at the specified time. diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1385,7 +1385,7 @@ details, consult the :manpage:`dlopen(3)` manpage, on Windows, *mode* is ignored. -The *use_errno* parameter, when set to True, enables a ctypes mechanism that +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 @@ -1396,7 +1396,7 @@ 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 *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 @@ -1607,7 +1607,7 @@ 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 + *use_errno* is set to ``True``, the ctypes private copy of the system :data:`errno` variable is exchanged with the real :data:`errno` value before and after the call; *use_last_error* does the same for the Windows error code. @@ -2100,8 +2100,8 @@ .. attribute:: _b_needsfree_ - This read-only variable is true when the ctypes data instance has - allocated the memory block itself, false otherwise. + This read-only variable is ``True`` when the ctypes data instance has + allocated the memory block itself, ``False`` otherwise. .. attribute:: _objects @@ -2339,7 +2339,7 @@ .. class:: c_bool Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` from - C99). Its value can be True or False, and the constructor accepts any object + C99). Its value can be ``True`` or ``False``, and the constructor accepts any object that has a truth value. .. versionadded:: 2.6 diff --git a/Doc/library/curses.panel.rst b/Doc/library/curses.panel.rst --- a/Doc/library/curses.panel.rst +++ b/Doc/library/curses.panel.rst @@ -72,7 +72,7 @@ .. method:: Panel.hidden() - Returns true if the panel is hidden (not visible), false otherwise. + Returns ``True`` if the panel is hidden (not visible), ``False`` otherwise. .. method:: Panel.hide() diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -220,7 +220,7 @@ .. function:: getsyx() Return the current coordinates of the virtual screen cursor in y and x. If - leaveok is currently true, then -1,-1 is returned. + leaveok is currently ``True``, then -1,-1 is returned. .. function:: getwin(file) @@ -1116,8 +1116,8 @@ Control what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a newline action on the bottom - line, or typing the last character of the last line. If *flag* is false, the - cursor is left on the bottom line. If *flag* is true, the window is scrolled up + line, or typing the last character of the last line. If *flag* is ``False``, the + cursor is left on the bottom line. If *flag* is ``True``, the window is scrolled up one line. Note that in order to get the physical scrolling effect on the terminal, it is also necessary to call :meth:`idlok`. diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -219,18 +219,18 @@ | Operation | Result | +================================+===============================================+ | ``t1 = t2 + t3`` | Sum of *t2* and *t3*. Afterwards *t1*-*t2* == | -| | *t3* and *t1*-*t3* == *t2* are true. (1) | +| | *t3* and *t1*-*t3* == *t2* are ``True``. (1) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 - t3`` | Difference of *t2* and *t3*. Afterwards *t1* | | | == *t2* - *t3* and *t2* == *t1* + *t3* are | -| | true. (1) | +| | ``True``. (1) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 * i or t1 = i * t2`` | Delta multiplied by an integer or long. | -| | Afterwards *t1* // i == *t2* is true, | +| | Afterwards *t1* // i == *t2* is ``True``, | | | provided ``i != 0``. | +--------------------------------+-----------------------------------------------+ | | In general, *t1* \* i == *t1* \* (i-1) + *t1* | -| | is true. (1) | +| | is ``True`` (1) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 // i`` | The floor is computed and the remainder (if | | | any) is thrown away. (3) | @@ -292,7 +292,7 @@ :class:`timedelta` objects are :term:`hashable` (usable as dictionary keys), support efficient pickling, and in Boolean contexts, a :class:`timedelta` object is -considered to be true if and only if it isn't equal to ``timedelta(0)``. +considered to be ``True`` if and only if it isn't equal to ``timedelta(0)``. Instance methods: @@ -467,7 +467,7 @@ :const:`False` or :const:`True`, respectively. Dates can be used as dictionary keys. In Boolean contexts, all :class:`date` -objects are considered to be true. +objects are considered to be ``True``. Instance methods: @@ -786,7 +786,7 @@ .. attribute:: datetime.tzinfo The object passed as the *tzinfo* argument to the :class:`.datetime` constructor, - or ``None`` if none was passed. + or ``None`` if ``None`` was passed. Supported operations: @@ -859,7 +859,7 @@ :const:`False` or :const:`True`, respectively. :class:`.datetime` objects can be used as dictionary keys. In Boolean contexts, -all :class:`.datetime` objects are considered to be true. +all :class:`.datetime` objects are considered to be ``True``. Instance methods: @@ -1213,7 +1213,7 @@ .. attribute:: time.tzinfo The object passed as the tzinfo argument to the :class:`.time` constructor, or - ``None`` if none was passed. + ``None`` if ``None`` was passed. Supported operations: @@ -1234,7 +1234,7 @@ * efficient pickling -* in Boolean contexts, a :class:`.time` object is considered to be true if and +* in Boolean contexts, a :class:`.time` object is considered to be ``True`` if and only if, after converting it to minutes and subtracting :meth:`utcoffset` (or ``0`` if that's ``None``), the result is non-zero. diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1226,52 +1226,52 @@ .. method:: is_canonical(x) - Returns True if *x* is canonical; otherwise returns False. + Returns ``True`` if *x* is canonical; otherwise returns ``False``. .. method:: is_finite(x) - Returns True if *x* is finite; otherwise returns False. + Returns ``True`` if *x* is finite; otherwise returns ``False``. .. method:: is_infinite(x) - Returns True if *x* is infinite; otherwise returns False. + Returns ``True`` if *x* is infinite; otherwise returns ``False``. .. method:: is_nan(x) - Returns True if *x* is a qNaN or sNaN; otherwise returns False. + Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``. .. method:: is_normal(x) - Returns True if *x* is a normal number; otherwise returns False. + Returns ``True`` if *x* is a normal number; otherwise returns ``False``. .. method:: is_qnan(x) - Returns True if *x* is a quiet NaN; otherwise returns False. + Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``. .. method:: is_signed(x) - Returns True if *x* is negative; otherwise returns False. + Returns ``True`` if *x* is negative; otherwise returns ``False``. .. method:: is_snan(x) - Returns True if *x* is a signaling NaN; otherwise returns False. + Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``. .. method:: is_subnormal(x) - Returns True if *x* is subnormal; otherwise returns False. + Returns ``True`` if *x* is subnormal; otherwise returns ``False``. .. method:: is_zero(x) - Returns True if *x* is a zero; otherwise returns False. + Returns ``True`` if *x* is a zero; otherwise returns ``False``. .. method:: ln(x) @@ -1431,7 +1431,7 @@ .. method:: same_quantum(x, y) - Returns True if the two operands have the same exponent. + Returns ``True`` if the two operands have the same exponent. .. method:: scaleb (x, y) diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -217,8 +217,8 @@ Optional keyword parameters *linejunk* and *charjunk* are for filter functions (or ``None``): - *linejunk*: A function that accepts a single string argument, and returns true - if the string is junk, or false if not. The default is (``None``), starting with + *linejunk*: A function that accepts a single string argument, and returns ``True`` + if the string is junk, or ``False`` if not. The default is (``None``), starting with Python 2.3. Before then, the default was the module-level function :func:`IS_LINE_JUNK`, which filters out lines without visible characters, except for at most one pound character (``'#'``). As of Python 2.3, the underlying @@ -227,7 +227,7 @@ default. *charjunk*: A function that accepts a character (a string of length 1), and - returns if the character is junk, or false if not. The default is module-level + returns if the character is junk, or ``False`` if not. The default is module-level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace characters (a blank or tab; note: bad idea to include newline in this!). @@ -317,14 +317,14 @@ .. function:: IS_LINE_JUNK(line) - Return true for ignorable lines. The line *line* is ignorable if *line* is + Return ``True`` for ignorable lines. The line *line* is ignorable if *line* is blank or contains a single ``'#'``, otherwise it is not ignorable. Used as a default for parameter *linejunk* in :func:`ndiff` before Python 2.3. .. function:: IS_CHARACTER_JUNK(ch) - Return true for ignorable characters. The character *ch* is ignorable if *ch* + Return ``True`` for ignorable characters. The character *ch* is ignorable if *ch* is a space or tab, otherwise it is not ignorable. Used as a default for parameter *charjunk* in :func:`ndiff`. @@ -347,7 +347,7 @@ .. class:: SequenceMatcher(isjunk=None, a='', b='', autojunk=True) Optional argument *isjunk* must be ``None`` (the default) or a one-argument - function that takes a sequence element and returns true if and only if the + function that takes a sequence element and returns ``True`` if and only if the element is "junk" and should be ignored. Passing ``None`` for *isjunk* is equivalent to passing ``lambda x: 0``; in other words, no elements are ignored. For example, pass:: @@ -617,12 +617,12 @@ Optional keyword parameters *linejunk* and *charjunk* are for filter functions (or ``None``): - *linejunk*: A function that accepts a single string argument, and returns true + *linejunk*: A function that accepts a single string argument, and returns ``True`` if the string is junk. The default is ``None``, meaning that no line is considered junk. *charjunk*: A function that accepts a single character argument (a string of - length 1), and returns true if the character is junk. The default is ``None``, + length 1), and returns ``True`` if the character is junk. The default is ``None``, meaning that no character is considered junk. :class:`Differ` objects are used (deltas generated) via a single method: diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -50,7 +50,7 @@ .. function:: distb([tb]) Disassembles the top-of-stack function of a traceback, using the last traceback - if none was passed. The instruction causing the exception is indicated. + if ``None`` was passed. The instruction causing the exception is indicated. .. function:: disassemble(code[, lasti]) @@ -569,7 +569,7 @@ EXIT is removed from the stack, leaving the values above it in the same order. In addition, if the stack represents an exception, *and* the function - call returns a 'true' value, this information is "zapped", to prevent + call returns a ``True`` value, this information is "zapped", to prevent ``END_FINALLY`` from re-raising the exception. (But non-local gotos should still be resumed.) @@ -686,24 +686,24 @@ .. opcode:: POP_JUMP_IF_TRUE (target) - If TOS is true, sets the bytecode counter to *target*. TOS is popped. + If TOS is ``True``, sets the bytecode counter to *target*. TOS is popped. .. opcode:: POP_JUMP_IF_FALSE (target) - If TOS is false, sets the bytecode counter to *target*. TOS is popped. + If TOS is ``False``, sets the bytecode counter to *target*. TOS is popped. .. opcode:: JUMP_IF_TRUE_OR_POP (target) - If TOS is true, sets the bytecode counter to *target* and leaves TOS - on the stack. Otherwise (TOS is false), TOS is popped. + If TOS is ``True``, sets the bytecode counter to *target* and leaves TOS + on the stack. Otherwise (TOS is ``False``), TOS is popped. .. opcode:: JUMP_IF_FALSE_OR_POP (target) - If TOS is false, sets the bytecode counter to *target* and leaves - TOS on the stack. Otherwise (TOS is true), TOS is popped. + If TOS is ``False``, sets the bytecode counter to *target* and leaves + TOS on the stack. Otherwise (TOS is ``True``), TOS is popped. .. opcode:: JUMP_ABSOLUTE (target) diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -880,18 +880,18 @@ then reused to test any number of subclasses by passing an *extraglobs* dict mapping the generic name to the subclass to be tested. - Optional argument *verbose* prints lots of stuff if true, and prints only - failures if false; by default, or if ``None``, it's true if and only if ``'-v'`` + Optional argument *verbose* prints lots of stuff if ``True``, and prints only + failures if ``False``; by default, or if ``None``, it's ``True`` if and only if ``'-v'`` is in ``sys.argv``. - Optional argument *report* prints a summary at the end when true, else prints + Optional argument *report* prints a summary at the end when ``True``, else prints nothing at the end. In verbose mode, the summary is detailed, else the summary is very brief (in fact, empty if all tests passed). Optional argument *optionflags* or's together option flags. See section :ref:`doctest-options`. - Optional argument *raise_on_error* defaults to false. If true, an exception is + Optional argument *raise_on_error* defaults to ``False``. If ``True``, an exception is raised upon the first failure or unexpected exception in an example. This allows failures to be post-mortem debugged. Default behavior is to continue running examples. @@ -930,12 +930,12 @@ Optional argument *name* gives the name of the module; by default, or if ``None``, ``m.__name__`` is used. - Optional argument *exclude_empty* defaults to false. If true, objects for which + Optional argument *exclude_empty* defaults to ``False``. If ``True``, objects for which no doctests are found are excluded from consideration. The default is a backward compatibility hack, so that code still using :meth:`doctest.master.summarize` in conjunction with :func:`testmod` continues to get output for objects with no tests. The *exclude_empty* argument to the newer :class:`DocTestFinder` - constructor defaults to true. + constructor defaults to ``True``. Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, *raise_on_error*, and *globs* are the same as for function :func:`testfile` @@ -965,7 +965,7 @@ Optional argument *name* is used in failure messages, and defaults to ``"NoName"``. - If optional argument *verbose* is true, output is generated even if there are no + If optional argument *verbose* is ``True``, output is generated even if there are no failures. By default, output is generated only in case of an example failure. Optional argument *compileflags* gives the set of flags that should be used by @@ -1269,7 +1269,7 @@ .. 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. @@ -1356,10 +1356,10 @@ The optional argument *parser* specifies the :class:`DocTestParser` object (or a drop-in replacement) that is used to extract doctests from docstrings. - If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` + If the optional argument *recurse* is ``False``, then :meth:`DocTestFinder.find` will only examine the given object, and not any contained objects. - If the optional argument *exclude_empty* is false, then + If the optional argument *exclude_empty* is ``False``, then :meth:`DocTestFinder.find` will include tests for objects with empty docstrings. .. versionadded:: 2.4 @@ -1377,7 +1377,7 @@ 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. @@ -1540,7 +1540,7 @@ results using the writer function *out*. The examples are run in the namespace ``test.globs``. If *clear_globs* is - true (the default), then this namespace will be cleared after the test runs, + ``True`` (the default), then this namespace will be cleared after the test runs, to help with garbage collection. If you would like to examine the namespace after the test completes, then use *clear_globs=False*. @@ -1576,7 +1576,7 @@ A class used to check the whether the actual output from a doctest example matches the expected output. :class:`OutputChecker` defines two methods: - :meth:`check_output`, which compares a given pair of outputs, and returns true + :meth:`check_output`, which compares a given pair of outputs, and returns ``True`` if they match; and :meth:`output_difference`, which returns a string describing the differences between two outputs. @@ -1742,11 +1742,11 @@ execution context. Optional argument *pm* controls whether post-mortem debugging is used. If *pm* - has a true value, the script file is run directly, and the debugger gets + has a ``True`` value, the script file is run directly, and the debugger gets involved only if the script terminates via raising an unhandled exception. If it does, then post-mortem debugging is invoked, via :func:`pdb.post_mortem`, passing the traceback object from the unhandled exception. If *pm* is not - specified, or is false, the script is run under the debugger from the start, via + specified, or is ``False``, the script is run under the debugger from the start, via passing an appropriate :func:`execfile` call to :func:`pdb.run`. .. versionadded:: 2.3 diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst --- a/Doc/library/email.errors.rst +++ b/Doc/library/email.errors.rst @@ -87,6 +87,6 @@ * :class:`MultipartInvariantViolationDefect` -- A message claimed to be a :mimetype:`multipart`, but no subparts were found. Note that when a message has - this defect, its :meth:`is_multipart` method may return false even though its + this defect, its :meth:`is_multipart` method may return ``False`` even though its content type claims to be :mimetype:`multipart`. diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -91,7 +91,7 @@ is used. *s* may be a byte string or a Unicode string. If it is a byte string - (i.e. ``isinstance(s, str)`` is true), then *charset* is the encoding of + (i.e. ``isinstance(s, str)`` is ``True``), then *charset* is the encoding of that byte string, and a :exc:`UnicodeError` will be raised if the string cannot be decoded with that character set. diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst --- a/Doc/library/email.message.rst +++ b/Doc/library/email.message.rst @@ -68,7 +68,7 @@ Return ``True`` if the message's payload is a list of sub-\ :class:`Message` objects, otherwise return ``False``. When - :meth:`is_multipart` returns False, the payload should be a string object. + :meth:`is_multipart` returns ``False``, the payload should be a string object. .. method:: set_unixfrom(unixfrom) @@ -192,7 +192,7 @@ .. method:: __contains__(name) - Return true if the message object has a field named *name*. Matching is + Return ``True`` if the message object has a field named *name*. Matching is done case-insensitively and *name* should not include the trailing colon. Used for the ``in`` operator, e.g.:: @@ -233,8 +233,8 @@ .. method:: has_key(name) - Return true if the message contains a header field named *name*, otherwise - return false. + Return ``True`` if the message contains a header field named *name*, otherwise + return ``False``. .. method:: keys() diff --git a/Doc/library/email.rst b/Doc/library/email.rst --- a/Doc/library/email.rst +++ b/Doc/library/email.rst @@ -167,7 +167,7 @@ * The object structure has changed in the face of :mimetype:`message/rfc822` content types. In :mod:`email` version 1, such a type would be represented by a scalar payload, i.e. the container message's :meth:`is_multipart` returned - false, :meth:`get_payload` was not a list object, but a single :class:`Message` + ``False``, :meth:`get_payload` was not a list object, but a single :class:`Message` instance. This structure was inconsistent with the rest of the package, so the object diff --git a/Doc/library/email.util.rst b/Doc/library/email.util.rst --- a/Doc/library/email.util.rst +++ b/Doc/library/email.util.rst @@ -33,7 +33,7 @@ The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form ``(realname, email_address)`` and returns the string value suitable for a :mailheader:`To` or - :mailheader:`Cc` header. If the first element of *pair* is false, then the + :mailheader:`Cc` header. If the first element of *pair* is ``False``, then the second element is returned unmodified. diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -61,12 +61,12 @@ If a mutable buffer is passed, then the behaviour is determined by the value of the *mutate_flag* parameter. - If it is false, the buffer's mutability is ignored and behaviour is as for a + If it is ``False``, the buffer's mutability is ignored and behaviour is as for a read-only buffer, except that the 1024 byte limit mentioned above is avoided -- so long as the buffer you pass is as least as long as what the operating system wants to put there, things should work. - If *mutate_flag* is true, then the buffer is (in effect) passed to the + If *mutate_flag* is ``True``, then the buffer is (in effect) passed to the underlying :func:`ioctl` system call, the latter's return code is passed back to the calling Python, and the buffer's new contents reflect the action of the :func:`ioctl`. This is a slight simplification, because if the supplied buffer @@ -74,7 +74,7 @@ long which is then passed to :func:`ioctl` and copied back into the supplied buffer. - If *mutate_flag* is not supplied, then from Python 2.5 it defaults to true, + If *mutate_flag* is not supplied, then from Python 2.5 it defaults to ``True``, which is a change from versions 2.3 and 2.4. Supply the argument explicitly if version portability is a priority. diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -21,7 +21,7 @@ Compare the files named *f1* and *f2*, returning ``True`` if they seem equal, ``False`` otherwise. - Unless *shallow* is given and is false, files with identical :func:`os.stat` + Unless *shallow* is given and is ``False``, files with identical :func:`os.stat` signatures are taken to be equal. Files that were compared using this function will not be compared again unless diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -94,14 +94,14 @@ .. function:: isfirstline() - Returns true if the line just read is the first line of its file, otherwise - returns false. + Returns ``True`` if the line just read is the first line of its file, otherwise + returns ``False``. .. function:: isstdin() - Returns true if the last line was read from ``sys.stdin``, otherwise returns - false. + Returns ``True`` if the last line was read from ``sys.stdin``, otherwise returns + ``False``. .. function:: nextfile() diff --git a/Doc/library/formatter.rst b/Doc/library/formatter.rst --- a/Doc/library/formatter.rst +++ b/Doc/library/formatter.rst @@ -153,7 +153,7 @@ Increase the number of left margin indentations by one, associating the logical tag *margin* with the new indentation. The initial margin level is ``0``. - Changed values of the logical tag must be true values; false values other than + Changed values of the logical tag must be ``True`` values; ``False`` values other than :const:`AS_IS` are not sufficient to change the margin. @@ -185,7 +185,7 @@ Inform the formatter that data has been added to the current paragraph out-of-band. This should be used when the writer has been manipulated - directly. The optional *flag* argument can be set to false if the writer + directly. The optional *flag* argument can be set to ``False`` if the writer manipulations produced a hard line break at the end of the output. @@ -253,7 +253,7 @@ Set the margin level to the integer *level* and the logical tag to *margin*. Interpretation of the logical tag is at the writer's discretion; the only - restriction on the value of the logical tag is that it not be a false value for + restriction on the value of the logical tag is that it not be a ``False`` value for non-zero values of *level*. @@ -344,7 +344,7 @@ .. 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. diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -236,7 +236,7 @@ .. method:: FTP.set_pasv(boolean) - Enable "passive" mode if *boolean* is true, other disable passive mode. (In + Enable "passive" mode if *boolean* is ``True``, other disable passive mode. (In Python 2.0 and before, passive mode was off by default; in Python 2.1 and later, it is on by default.) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -46,7 +46,7 @@ .. function:: all(iterable) - Return True if all elements of the *iterable* are true (or if the iterable + Return ``True`` if all elements of the *iterable* are ``True`` (or if the iterable is empty). Equivalent to:: def all(iterable): @@ -60,8 +60,8 @@ .. function:: any(iterable) - Return True if any element of the *iterable* is true. If the iterable - is empty, return False. Equivalent to:: + Return ``True`` if any element of the *iterable* is ``True``. If the iterable + is empty, return ``False``. Equivalent to:: def any(iterable): for element in iterable: @@ -94,7 +94,7 @@ .. function:: bool([x]) Convert a value to a Boolean, using the standard truth testing procedure. If - *x* is false or omitted, this returns :const:`False`; otherwise it returns + *x* is ``False`` or omitted, this returns :const:`False`; otherwise it returns :const:`True`. :class:`bool` is also a class, which is a subclass of :class:`int`. Class :class:`bool` cannot be subclassed further. Its only instances are :const:`False` and :const:`True`. @@ -139,7 +139,7 @@ Return :const:`True` if the *object* argument appears callable, :const:`False` if not. If this - returns true, it is still possible that a call fails, but if it is false, + returns ``True``, it is still possible that a call fails, but if it is ``False``, calling *object* will never succeed. Note that classes are callable (calling a class returns a new instance); class instances are callable if they have a :meth:`__call__` method. @@ -470,11 +470,11 @@ .. function:: filter(function, iterable) Construct a list from those elements of *iterable* for which *function* returns - true. *iterable* may be either a sequence, a container which supports + ``True``. *iterable* may be either a sequence, a container which supports iteration, or an iterator. If *iterable* is a string or a tuple, the result also has that type; otherwise it is always a list. If *function* is ``None``, the identity function is assumed, that is, all elements of *iterable* that are - false are removed. + ``False`` are removed. Note that ``filter(function, iterable)`` is equivalent to ``[item for item in iterable if function(item)]`` if function is not ``None`` and ``[item for item @@ -482,7 +482,7 @@ See :func:`itertools.ifilter` and :func:`itertools.ifilterfalse` for iterator versions of this function, including a variation that filters for elements - where the *function* returns false. + where the *function* returns ``False``. .. function:: float([x]) @@ -654,13 +654,13 @@ .. function:: isinstance(object, classinfo) - Return true if the *object* argument is an instance of the *classinfo* argument, + Return ``True`` if the *object* argument is an instance of the *classinfo* argument, or of a (direct, indirect or :term:`virtual `) subclass - thereof. Also return true if *classinfo* + thereof. Also return ``True`` if *classinfo* is a type object (new-style class) and *object* is an object of that type or of a (direct, indirect or :term:`virtual `) subclass thereof. If *object* is not a class instance or - an object of the given type, the function always returns false. If *classinfo* + an object of the given type, the function always returns ``False``. If *classinfo* is neither a class object nor a type object, it may be a tuple of class or type objects, or may recursively contain other such tuples (other sequence types are not accepted). If *classinfo* is not a class, type, or tuple of classes, types, @@ -672,7 +672,7 @@ .. function:: issubclass(class, classinfo) - Return true if *class* is a subclass (direct, indirect or :term:`virtual + Return ``True`` if *class* is a subclass (direct, indirect or :term:`virtual `) of *classinfo*. A class is considered a subclass of itself. *classinfo* may be a tuple of class objects, in which case every entry in *classinfo* will be checked. In any other @@ -1369,8 +1369,8 @@ is dynamic and can change whenever the inheritance hierarchy is updated. If the second argument is omitted, the super object returned is unbound. If - the second argument is an object, ``isinstance(obj, type)`` must be true. If - the second argument is a type, ``issubclass(type2, type)`` must be true (this + the second argument is an object, ``isinstance(obj, type)`` must be ``True``. If + the second argument is a type, ``issubclass(type2, type)`` must be ``True`` (this is useful for classmethods). .. note:: diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -34,7 +34,7 @@ .. function:: isenabled() - Returns true if automatic collection is enabled. + Returns ``True`` if automatic collection is enabled. .. function:: collect([generation]) @@ -142,8 +142,8 @@ .. function:: is_tracked(obj) - Returns True if the object is currently tracked by the garbage collector, - False otherwise. As a general rule, instances of atomic types aren't + Returns ``True`` if the object is currently tracked by the garbage collector, + ``False`` otherwise. As a general rule, instances of atomic types aren't tracked and instances of non-atomic types (containers, user-defined objects...) are. However, some type-specific optimizations can be present in order to suppress the garbage collector footprint of simple instances diff --git a/Doc/library/gensuitemodule.rst b/Doc/library/gensuitemodule.rst --- a/Doc/library/gensuitemodule.rst +++ b/Doc/library/gensuitemodule.rst @@ -23,7 +23,7 @@ .. function:: is_scriptable(application) - Returns true if ``application``, which should be passed as a pathname, appears + Returns ``True`` if ``application``, which should be passed as a pathname, appears to be scriptable. Take the return value with a grain of salt: :program:`Internet Explorer` appears not to be scriptable but definitely is. diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst --- a/Doc/library/gettext.rst +++ b/Doc/library/gettext.rst @@ -198,8 +198,8 @@ the cache. If no :file:`.mo` file is found, this function raises :exc:`IOError` if - *fallback* is false (which is the default), and returns a - :class:`NullTranslations` instance if *fallback* is true. + *fallback* is ``False`` (which is the default), and returns a + :class:`NullTranslations` instance if *fallback* is ``True``. .. versionchanged:: 2.4 Added the *codeset* parameter. @@ -344,9 +344,9 @@ .. method:: install([unicode [, names]]) - If the *unicode* flag is false, this method installs :meth:`self.gettext` - into the built-in namespace, binding it to ``_``. If *unicode* is true, - it binds :meth:`self.ugettext` instead. By default, *unicode* is false. + If the *unicode* flag is ``False``, this method installs :meth:`self.gettext` + into the built-in namespace, binding it to ``_``. If *unicode* is ``True``, + it binds :meth:`self.ugettext` instead. By default, *unicode* is ``False``. If the *names* parameter is given, it must be a sequence containing the names of functions you want to install in the builtins namespace in diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst --- a/Doc/library/htmllib.rst +++ b/Doc/library/htmllib.rst @@ -108,10 +108,10 @@ .. attribute:: HTMLParser.nofill - Boolean flag which should be true when whitespace should not be collapsed, or - false when it should be. In general, this should only be true when character + Boolean flag which should be ``True`` when whitespace should not be collapsed, or + ``False`` when it should be. In general, this should only be ``True`` when character data is to be treated as "preformatted" text, as within a ``
`` element.
-   The default value is false.  This affects the operation of :meth:`handle_data`
+   The default value is ``False``.  This affects the operation of :meth:`handle_data`
    and :meth:`save_end`.
 
 
@@ -147,7 +147,7 @@
 .. method:: HTMLParser.save_end()
 
    Ends buffering character data and returns all data saved since the preceding
-   call to :meth:`save_bgn`.  If the :attr:`nofill` flag is false, whitespace is
+   call to :meth:`save_bgn`.  If the :attr:`nofill` flag is ``False``, whitespace is
    collapsed to single spaces.  A call to this method without a preceding call to
    :meth:`save_bgn` will raise a :exc:`TypeError` exception.
 
diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst
--- a/Doc/library/httplib.rst
+++ b/Doc/library/httplib.rst
@@ -44,7 +44,7 @@
    server.  It should be instantiated passing it a host and optional port
    number.  If no port number is passed, the port is extracted from the host
    string if it has the form ``host:port``, else the default HTTP port (80) is
-   used.  When True, the optional parameter *strict* (which defaults to a false
+   used.  When ``True``, the optional parameter *strict* (which defaults to a ``False``
    value) causes ``BadStatusLine`` to
    be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1
    status line.  If the optional *timeout* parameter is given, blocking
@@ -477,7 +477,7 @@
    It sends a line to the server consisting of the *request* string, the *selector*
    string, and the HTTP version (``HTTP/1.1``).  To disable automatic sending of
    ``Host:`` or ``Accept-Encoding:`` headers (for example to accept additional
-   content encodings), specify *skip_host* or *skip_accept_encoding* with non-False
+   content encodings), specify *skip_host* or *skip_accept_encoding* with non-``False``
    values.
 
    .. versionchanged:: 2.4
diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst
--- a/Doc/library/imaplib.rst
+++ b/Doc/library/imaplib.rst
@@ -90,7 +90,7 @@
 
    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)
 
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -36,183 +36,183 @@
 They also help you determine when you can expect to find the following special
 attributes:
 
-+-----------+-----------------+---------------------------+-------+
-| Type      | Attribute       | Description               | Notes |
-+===========+=================+===========================+=======+
-| module    | __doc__         | documentation string      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __file__        | filename (missing for     |       |
-|           |                 | built-in modules)         |       |
-+-----------+-----------------+---------------------------+-------+
-| class     | __doc__         | documentation string      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __module__      | name of module in which   |       |
-|           |                 | this class was defined    |       |
-+-----------+-----------------+---------------------------+-------+
-| method    | __doc__         | documentation string      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __name__        | name with which this      |       |
-|           |                 | method was defined        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | im_class        | class object that asked   | \(1)  |
-|           |                 | for this method           |       |
-+-----------+-----------------+---------------------------+-------+
-|           | im_func or      | function object           |       |
-|           | __func__        | containing implementation |       |
-|           |                 | of method                 |       |
-+-----------+-----------------+---------------------------+-------+
-|           | im_self or      | instance to which this    |       |
-|           | __self__        | method is bound, or       |       |
-|           |                 | ``None``                  |       |
-+-----------+-----------------+---------------------------+-------+
-| function  | __doc__         | documentation string      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __name__        | name with which this      |       |
-|           |                 | function was defined      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | func_code       | code object containing    |       |
-|           |                 | compiled function         |       |
-|           |                 | :term:`bytecode`          |       |
-+-----------+-----------------+---------------------------+-------+
-|           | func_defaults   | tuple of any default      |       |
-|           |                 | values for arguments      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | func_doc        | (same as __doc__)         |       |
-+-----------+-----------------+---------------------------+-------+
-|           | func_globals    | global namespace in which |       |
-|           |                 | this function was defined |       |
-+-----------+-----------------+---------------------------+-------+
-|           | func_name       | (same as __name__)        |       |
-+-----------+-----------------+---------------------------+-------+
-| generator | __iter__        | defined to support        |       |
-|           |                 | iteration over container  |       |
-+-----------+-----------------+---------------------------+-------+
-|           | close           | raises new GeneratorExit  |       |
-|           |                 | exception inside the      |       |
-|           |                 | generator to terminate    |       |
-|           |                 | the iteration             |       |
-+-----------+-----------------+---------------------------+-------+
-|           | gi_code         | code object               |       |
-+-----------+-----------------+---------------------------+-------+
-|           | gi_frame        | frame object or possibly  |       |
-|           |                 | None once the generator   |       |
-|           |                 | has been exhausted        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | gi_running      | set to 1 when generator   |       |
-|           |                 | is executing, 0 otherwise |       |
-+-----------+-----------------+---------------------------+-------+
-|           | next            | return the next item from |       |
-|           |                 | the container             |       |
-+-----------+-----------------+---------------------------+-------+
-|           | send            | resumes the generator and |       |
-|           |                 | "sends" a value that      |       |
-|           |                 | becomes the result of the |       |
-|           |                 | current yield-expression  |       |
-+-----------+-----------------+---------------------------+-------+
-|           | throw           | used to raise an          |       |
-|           |                 | exception inside the      |       |
-|           |                 | generator                 |       |
-+-----------+-----------------+---------------------------+-------+
-| traceback | tb_frame        | frame object at this      |       |
-|           |                 | level                     |       |
-+-----------+-----------------+---------------------------+-------+
-|           | tb_lasti        | index of last attempted   |       |
-|           |                 | instruction in bytecode   |       |
-+-----------+-----------------+---------------------------+-------+
-|           | tb_lineno       | current line number in    |       |
-|           |                 | Python source code        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | tb_next         | next inner traceback      |       |
-|           |                 | object (called by this    |       |
-|           |                 | level)                    |       |
-+-----------+-----------------+---------------------------+-------+
-| frame     | f_back          | next outer frame object   |       |
-|           |                 | (this frame's caller)     |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_builtins      | builtins namespace seen   |       |
-|           |                 | by this frame             |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_code          | code object being         |       |
-|           |                 | executed in this frame    |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_exc_traceback | traceback if raised in    |       |
-|           |                 | this frame, or ``None``   |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_exc_type      | exception type if raised  |       |
-|           |                 | in this frame, or         |       |
-|           |                 | ``None``                  |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_exc_value     | exception value if raised |       |
-|           |                 | in this frame, or         |       |
-|           |                 | ``None``                  |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_globals       | global namespace seen by  |       |
-|           |                 | this frame                |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_lasti         | index of last attempted   |       |
-|           |                 | instruction in bytecode   |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_lineno        | current line number in    |       |
-|           |                 | Python source code        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_locals        | local namespace seen by   |       |
-|           |                 | this frame                |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_restricted    | 0 or 1 if frame is in     |       |
-|           |                 | restricted execution mode |       |
-+-----------+-----------------+---------------------------+-------+
-|           | f_trace         | tracing function for this |       |
-|           |                 | frame, or ``None``        |       |
-+-----------+-----------------+---------------------------+-------+
-| code      | co_argcount     | number of arguments (not  |       |
-|           |                 | including \* or \*\*      |       |
-|           |                 | args)                     |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_code         | string of raw compiled    |       |
-|           |                 | bytecode                  |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_consts       | tuple of constants used   |       |
-|           |                 | in the bytecode           |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_filename     | name of file in which     |       |
-|           |                 | this code object was      |       |
-|           |                 | created                   |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_firstlineno  | number of first line in   |       |
-|           |                 | Python source code        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_flags        | bitmap: 1=optimized ``|`` |       |
-|           |                 | 2=newlocals ``|`` 4=\*arg |       |
-|           |                 | ``|`` 8=\*\*arg           |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_lnotab       | encoded mapping of line   |       |
-|           |                 | numbers to bytecode       |       |
-|           |                 | indices                   |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_name         | name with which this code |       |
-|           |                 | object was defined        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_names        | tuple of names of local   |       |
-|           |                 | variables                 |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_nlocals      | number of local variables |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_stacksize    | virtual machine stack     |       |
-|           |                 | space required            |       |
-+-----------+-----------------+---------------------------+-------+
-|           | co_varnames     | tuple of names of         |       |
-|           |                 | arguments and local       |       |
-|           |                 | variables                 |       |
-+-----------+-----------------+---------------------------+-------+
-| builtin   | __doc__         | documentation string      |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __name__        | original name of this     |       |
-|           |                 | function or method        |       |
-+-----------+-----------------+---------------------------+-------+
-|           | __self__        | instance to which a       |       |
-|           |                 | method is bound, or       |       |
-|           |                 | ``None``                  |       |
-+-----------+-----------------+---------------------------+-------+
++-----------+-----------------+--------------------------------+-------+
+| Type      | Attribute       | Description                    | Notes |
++===========+=================+================================+=======+
+| module    | __doc__         | documentation string           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __file__        | filename (missing for          |       |
+|           |                 | built-in modules)              |       |
++-----------+-----------------+--------------------------------+-------+
+| class     | __doc__         | documentation string           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __module__      | name of module in which        |       |
+|           |                 | this class was defined         |       |
++-----------+-----------------+--------------------------------+-------+
+| method    | __doc__         | documentation string           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __name__        | name with which this           |       |
+|           |                 | method was defined             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | im_class        | class object that asked        | \(1)  |
+|           |                 | for this method                |       |
++-----------+-----------------+--------------------------------+-------+
+|           | im_func or      | function object                |       |
+|           | __func__        | containing implementation      |       |
+|           |                 | of method                      |       |
++-----------+-----------------+--------------------------------+-------+
+|           | im_self or      | instance to which this         |       |
+|           | __self__        | method is bound, or            |       |
+|           |                 | ``None``                       |       |
++-----------+-----------------+--------------------------------+-------+
+| function  | __doc__         | documentation string           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __name__        | name with which this           |       |
+|           |                 | function was defined           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | func_code       | code object containing         |       |
+|           |                 | compiled function              |       |
+|           |                 | :term:`bytecode`               |       |
++-----------+-----------------+--------------------------------+-------+
+|           | func_defaults   | tuple of any default           |       |
+|           |                 | values for arguments           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | func_doc        | (same as ``__doc__``)          |       |
++-----------+-----------------+--------------------------------+-------+
+|           | func_globals    | global namespace in which      |       |
+|           |                 | this function was defined      |       |
++-----------+-----------------+--------------------------------+-------+
+|           | func_name       | (same as ``__name__``)         |       |
++-----------+-----------------+--------------------------------+-------+
+| generator | __iter__        | defined to support             |       |
+|           |                 | iteration over container       |       |
++-----------+-----------------+--------------------------------+-------+
+|           | close           | raises new ``GeneratorExit``   |       |
+|           |                 | exception inside the           |       |
+|           |                 | generator to terminate         |       |
+|           |                 | the iteration                  |       |
++-----------+-----------------+--------------------------------+-------+
+|           | gi_code         | code object                    |       |
++-----------+-----------------+--------------------------------+-------+
+|           | gi_frame        | frame object or possibly       |       |
+|           |                 | ``None`` once the generator    |       |
+|           |                 | has been exhausted             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | gi_running      | set to ``1`` when generator    |       |
+|           |                 | is executing, ``0`` otherwise  |       |
++-----------+-----------------+--------------------------------+-------+
+|           | next            | return the next item from      |       |
+|           |                 | the container                  |       |
++-----------+-----------------+--------------------------------+-------+
+|           | send            | resumes the generator and      |       |
+|           |                 | "sends" a value that           |       |
+|           |                 | becomes the result of the      |       |
+|           |                 | current yield-expression       |       |
++-----------+-----------------+--------------------------------+-------+
+|           | throw           | used to raise an               |       |
+|           |                 | exception inside the           |       |
+|           |                 | generator                      |       |
++-----------+-----------------+--------------------------------+-------+
+| traceback | tb_frame        | frame object at this           |       |
+|           |                 | level                          |       |
++-----------+-----------------+--------------------------------+-------+
+|           | tb_lasti        | index of last attempted        |       |
+|           |                 | instruction in bytecode        |       |
++-----------+-----------------+--------------------------------+-------+
+|           | tb_lineno       | current line number in         |       |
+|           |                 | Python source code             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | tb_next         | next inner traceback           |       |
+|           |                 | object (called by this         |       |
+|           |                 | level)                         |       |
++-----------+-----------------+--------------------------------+-------+
+| frame     | f_back          | next outer frame object        |       |
+|           |                 | (this frame's caller)          |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_builtins      | ``builtins`` namespace seen    |       |
+|           |                 | by this frame                  |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_code          | code object being              |       |
+|           |                 | executed in this frame         |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_exc_traceback | traceback if raised in         |       |
+|           |                 | this frame, or ``None``        |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_exc_type      | exception type if raised       |       |
+|           |                 | in this frame, or              |       |
+|           |                 | ``None``                       |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_exc_value     | exception value if raised      |       |
+|           |                 | in this frame, or              |       |
+|           |                 | ``None``                       |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_globals       | global namespace seen by       |       |
+|           |                 | this frame                     |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_lasti         | index of last attempted        |       |
+|           |                 | instruction in bytecode        |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_lineno        | current line number in         |       |
+|           |                 | Python source code             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_locals        | local namespace seen by        |       |
+|           |                 | this frame                     |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_restricted    | ``0`` or ``1`` if frame is in  |       |
+|           |                 | restricted execution mode      |       |
++-----------+-----------------+--------------------------------+-------+
+|           | f_trace         | tracing function for this      |       |
+|           |                 | frame, or ``None``             |       |
++-----------+-----------------+--------------------------------+-------+
+| code      | co_argcount     | number of arguments (not       |       |
+|           |                 | including \* or \*\*           |       |
+|           |                 | args)                          |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_code         | string of raw compiled         |       |
+|           |                 | bytecode                       |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_consts       | tuple of constants used        |       |
+|           |                 | in the bytecode                |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_filename     | name of file in which          |       |
+|           |                 | this code object was           |       |
+|           |                 | created                        |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_firstlineno  | number of first line in        |       |
+|           |                 | Python source code             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_flags        | bitmap: 1=optimized ``|``      |       |
+|           |                 | 2=newlocals ``|`` 4=\*arg      |       |
+|           |                 | ``|`` 8=\*\*arg                |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_lnotab       | encoded mapping of line        |       |
+|           |                 | numbers to bytecode            |       |
+|           |                 | indices                        |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_name         | name with which this code      |       |
+|           |                 | object was defined             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_names        | tuple of names of local        |       |
+|           |                 | variables                      |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_nlocals      | number of local variables      |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_stacksize    | virtual machine stack          |       |
+|           |                 | space required                 |       |
++-----------+-----------------+--------------------------------+-------+
+|           | co_varnames     | tuple of names of              |       |
+|           |                 | arguments and local            |       |
+|           |                 | variables                      |       |
++-----------+-----------------+--------------------------------+-------+
+| builtin   | __doc__         | documentation string           |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __name__        | original name of this          |       |
+|           |                 | function or method             |       |
++-----------+-----------------+--------------------------------+-------+
+|           | __self__        | instance to which a            |       |
+|           |                 | method is bound, or            |       |
+|           |                 | ``None``                       |       |
++-----------+-----------------+--------------------------------+-------+
 
 Note:
 
@@ -225,7 +225,7 @@
 
    Return all the members of an object in a list of (name, value) pairs sorted by
    name.  If the optional *predicate* argument is supplied, only members for which
-   the predicate returns a true value are included.
+   the predicate returns a ``True`` value are included.
 
    .. note::
 
@@ -261,77 +261,77 @@
 
 .. function:: ismodule(object)
 
-   Return true if the object is a module.
+   Return ``True`` if the object is a module.
 
 
 .. function:: isclass(object)
 
-   Return true if the object is a class, whether built-in or created in Python
+   Return ``True`` if the object is a class, whether built-in or created in Python
    code.
 
 
 .. function:: ismethod(object)
 
-   Return true if the object is a bound method written in Python.
+   Return ``True`` if the object is a bound method written in Python.
 
 
 .. function:: isfunction(object)
 
-   Return true if the object is a Python function, which includes functions
+   Return ``True`` if the object is a Python function, which includes functions
    created by a :term:`lambda` expression.
 
 
 .. function:: isgeneratorfunction(object)
 
-   Return true if the object is a Python generator function.
+   Return ``True`` if the object is a Python generator function.
 
    .. versionadded:: 2.6
 
 
 .. function:: isgenerator(object)
 
-   Return true if the object is a generator.
+   Return ``True`` if the object is a generator.
 
    .. versionadded:: 2.6
 
 
 .. function:: istraceback(object)
 
-   Return true if the object is a traceback.
+   Return ``True`` if the object is a traceback.
 
 
 .. function:: isframe(object)
 
-   Return true if the object is a frame.
+   Return ``True`` if the object is a frame.
 
 
 .. function:: iscode(object)
 
-   Return true if the object is a code.
+   Return ``True`` if the object is a code.
 
 
 .. function:: isbuiltin(object)
 
-   Return true if the object is a built-in function or a bound built-in method.
+   Return ``True`` if the object is a built-in function or a bound built-in method.
 
 
 .. function:: isroutine(object)
 
-   Return true if the object is a user-defined or built-in function or method.
+   Return ``True`` if the object is a user-defined or built-in function or method.
 
 
 .. function:: isabstract(object)
 
-   Return true if the object is an abstract base class.
+   Return ``True`` if the object is an abstract base class.
 
    .. versionadded:: 2.6
 
 
 .. function:: ismethoddescriptor(object)
 
-   Return true if the object is a method descriptor, but not if
+   Return ``True`` if the object is a method descriptor, but not if
    :func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin`
-   are true.
+   are ``True``.
 
    This is new as of Python 2.2, and, for example, is true of
    ``int.__add__``. An object passing this test has a :attr:`__get__` attribute
@@ -339,14 +339,14 @@
    varies.  :attr:`__name__` is usually sensible, and :attr:`__doc__` often is.
 
    Methods implemented via descriptors that also pass one of the other tests
-   return false from the :func:`ismethoddescriptor` test, simply because the
+   return ``False`` from the :func:`ismethoddescriptor` test, simply because the
    other tests promise more -- you can, e.g., count on having the
    :attr:`im_func` attribute (etc) when an object passes :func:`ismethod`.
 
 
 .. function:: isdatadescriptor(object)
 
-   Return true if the object is a data descriptor.
+   Return ``True`` if the object is a data descriptor.
 
    Data descriptors have both a :attr:`__get__` and a :attr:`__set__` attribute.
    Examples are properties (defined in Python), getsets, and members.  The
@@ -361,7 +361,7 @@
 
 .. function:: isgetsetdescriptor(object)
 
-   Return true if the object is a getset descriptor.
+   Return ``True`` if the object is a getset descriptor.
 
    .. impl-detail::
 
@@ -374,7 +374,7 @@
 
 .. function:: ismemberdescriptor(object)
 
-   Return true if the object is a member descriptor.
+   Return ``True`` if the object is a member descriptor.
 
    .. impl-detail::
 
@@ -459,7 +459,7 @@
    Arrange the given list of classes into a hierarchy of nested lists. Where a
    nested list appears, it contains classes derived from the class whose entry
    immediately precedes the list.  Each entry is a 2-tuple containing a class and a
-   tuple of its base classes.  If the *unique* argument is true, exactly one entry
+   tuple of its base classes.  If the *unique* argument is ``True``, exactly one entry
    appears in the returned structure for each class in the given list.  Otherwise,
    classes using multiple inheritance and their descendants will appear multiple
    times.
@@ -471,7 +471,7 @@
    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*.
 
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -119,7 +119,7 @@
      "block size" and falling back on :attr:`DEFAULT_BUFFER_SIZE`.
      On many systems, the buffer will typically be 4096 or 8192 bytes long.
 
-   * "Interactive" text files (files for which :meth:`isatty` returns True)
+   * "Interactive" text files (files for which :meth:`isatty` returns ``True``)
      use line buffering.  Other text files use the policy described above
      for binary files.
 
@@ -258,7 +258,7 @@
 
    .. attribute:: closed
 
-      True if the stream is closed.
+     ``True`` if the stream is closed.
 
    .. method:: fileno()
 
@@ -278,7 +278,7 @@
 
    .. method:: readable()
 
-      Return ``True`` if the stream can be read from.  If False, :meth:`read`
+      Return ``True`` if the stream can be read from.  If ``False``, :meth:`read`
       will raise :exc:`IOError`.
 
    .. method:: readline(limit=-1)
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -52,8 +52,8 @@
 :func:`compress`        data, selectors                 (d[0] if s[0]), (d[1] if s[1]), ...                 ``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``
 :func:`dropwhile`       pred, seq                       seq[n], seq[n+1], starting when pred fails          ``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``
 :func:`groupby`         iterable[, keyfunc]             sub-iterators grouped by value of keyfunc(v)
-:func:`ifilter`         pred, seq                       elements of seq where pred(elem) is True            ``ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9``
-:func:`ifilterfalse`    pred, seq                       elements of seq where pred(elem) is False           ``ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``
+:func:`ifilter`         pred, seq                       elements of seq where pred(elem) is ``True``        ``ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9``
+:func:`ifilterfalse`    pred, seq                       elements of seq where pred(elem) is ``False``       ``ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``
 :func:`islice`          seq, [start,] stop [, step]     elements from seq[start:stop:step]                  ``islice('ABCDEFG', 2, None) --> C D E F G``
 :func:`imap`            func, p, q, ...                 func(p0, q0), func(p1, q1), ...                     ``imap(pow, (2,3,10), (5,2,3)) --> 32 9 1000``
 :func:`starmap`         func, seq                       func(\*seq[0]), func(\*seq[1]), ...                 ``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``
@@ -272,8 +272,8 @@
 .. function:: dropwhile(predicate, iterable)
 
    Make an iterator that drops elements from the iterable as long as the predicate
-   is true; afterwards, returns every element.  Note, the iterator does not produce
-   *any* output until the predicate first becomes false, so it may have a lengthy
+   is ``True``; afterwards, returns every element.  Note, the iterator does not produce
+   *any* output until the predicate first becomes ``False``, so it may have a lengthy
    start-up time.  Equivalent to::
 
       def dropwhile(predicate, iterable):
@@ -345,7 +345,7 @@
 
    Make an iterator that filters elements from iterable returning only those for
    which the predicate is ``True``. If *predicate* is ``None``, return the items
-   that are true. Equivalent to::
+   that are ``True``. Equivalent to::
 
       def ifilter(predicate, iterable):
           # ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9
@@ -360,7 +360,7 @@
 
    Make an iterator that filters elements from iterable returning only those for
    which the predicate is ``False``. If *predicate* is ``None``, return the items
-   that are false. Equivalent to::
+   that are ``False``. Equivalent to::
 
       def ifilterfalse(predicate, iterable):
           # ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8
@@ -616,7 +616,7 @@
 .. function:: takewhile(predicate, iterable)
 
    Make an iterator that returns elements from the iterable as long as the
-   predicate is true.  Equivalent to::
+   predicate is ``True``.  Equivalent to::
 
       def takewhile(predicate, iterable):
           # takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4
@@ -682,7 +682,7 @@
        return imap(function, count(start))
 
    def consume(iterator, n):
-       "Advance the iterator n-steps ahead. If n is none, consume entirely."
+       "Advance the iterator n-steps ahead. If n is None, consume entirely."
        # Use functions that consume iterators at C speed.
        if n is None:
            # feed the entire iterator into a zero-length deque
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -94,7 +94,7 @@
     ['[', '2.0', ', ', '1.0', ']']
 
 
-.. highlight:: none
+.. highlight:: ``None``
 
 Using json.tool from the shell to validate and pretty-print::
 
@@ -246,7 +246,7 @@
    are encountered.
 
    .. versionchanged:: 2.7
-      *parse_constant* doesn't get called on 'null', 'true', 'false' anymore.
+      *parse_constant* doesn't get called on ``'null'``, ``'true'``, ``'false'`` anymore.
 
    To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls``
    kwarg; otherwise :class:`JSONDecoder` is used.  Additional keyword arguments
@@ -387,7 +387,7 @@
    (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
diff --git a/Doc/library/keyword.rst b/Doc/library/keyword.rst
--- a/Doc/library/keyword.rst
+++ b/Doc/library/keyword.rst
@@ -13,7 +13,7 @@
 
 .. function:: iskeyword(s)
 
-   Return true if *s* is a Python keyword.
+   Return ``True`` if *s* is a Python keyword.
 
 
 .. data:: kwlist
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -365,10 +365,10 @@
 
    Formats a number *val* according to the current :const:`LC_NUMERIC` setting.
    The format follows the conventions of the ``%`` operator.  For floating point
-   values, the decimal point is modified if appropriate.  If *grouping* is true,
+   values, the decimal point is modified if appropriate.  If *grouping* is ``True``,
    also takes the grouping into account.
 
-   If *monetary* is true, the conversion uses monetary thousands separator and
+   If *monetary* is ``True``, the conversion uses monetary thousands separator and
    grouping strings.
 
    Please note that this function will only work for exactly one %char specifier.
@@ -390,9 +390,9 @@
 
    Formats a number *val* according to the current :const:`LC_MONETARY` settings.
 
-   The returned string includes the currency symbol if *symbol* is true, which is
-   the default. If *grouping* is true (which is not the default), grouping is done
-   with the value. If *international* is true (which is not the default), the
+   The returned string includes the currency symbol if *symbol* is ``True``, which is
+   the default. If *grouping* is ``True`` (which is not the default), grouping is done
+   with the value. If *international* is ``True`` (which is not the default), the
    international currency symbol is used.
 
    Note that this function will not work with the 'C' locale, so you have to set a
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -70,8 +70,8 @@
 
    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
-   with that encoding.  If *delay* is true, then file opening is deferred until the
+   :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.
 
    .. versionchanged:: 2.6
@@ -150,8 +150,8 @@
 
    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
-   with that encoding.  If *delay* is true, then file opening is deferred until the
+   :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.
 
 
@@ -174,8 +174,8 @@
 
    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
-   with that encoding.  If *delay* is true, then file opening is deferred until the
+   ``'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.
 
    You can use the *maxBytes* and *backupCount* values to allow the file to
@@ -250,7 +250,7 @@
    is created), the last modification time of an existing log file, or else
    the current time, is used to compute when the next rotation will occur.
 
-   If the *utc* argument is true, times in UTC will be used; otherwise
+   If the *utc* argument is ``True``, times in UTC will be used; otherwise
    local time is used.
 
    If *backupCount* is nonzero, at most *backupCount* files
@@ -258,7 +258,7 @@
    one is deleted. The deletion logic uses the interval to determine which
    files to delete, so changing the interval may leave old files lying around.
 
-   If *delay* is true, then file opening is deferred until the first call to
+   If *delay* is ``True``, then file opening is deferred until the first call to
    :meth:`emit`.
 
    .. versionchanged:: 2.6
@@ -660,7 +660,7 @@
 
    .. method:: emit(record)
 
-      Appends the record to the buffer. If :meth:`shouldFlush` returns true,
+      Appends the record to the buffer. If :meth:`shouldFlush` returns ``True``,
       calls :meth:`flush` to process the buffer.
 
 
@@ -672,7 +672,7 @@
 
    .. method:: shouldFlush(record)
 
-      Returns true if the buffer is up to capacity. This method can be
+      Returns ``True`` if the buffer is up to capacity. This method can be
       overridden to implement custom flushing strategies.
 
 
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -72,13 +72,13 @@
 
 .. attribute:: Logger.propagate
 
-   If this evaluates to true, events logged to this logger will be passed to the
+   If this evaluates to ``True``, events logged to this logger will be passed to the
    handlers of higher level (ancestor) loggers, in addition to any handlers
    attached to this logger. Messages are passed directly to the ancestor
    loggers' handlers - neither the level nor filters of the ancestor loggers in
    question are considered.
 
-   If this evaluates to false, logging messages are not passed to the handlers
+   If this evaluates to ``False``, logging messages are not passed to the handlers
    of ancestor loggers.
 
    The constructor sets this attribute to ``True``.
@@ -147,7 +147,7 @@
    use keywords in the format string, together with a single dictionary argument.)
 
    There are two keyword arguments in *kwargs* which are inspected: *exc_info*
-   which, if it does not evaluate as false, causes exception information to be
+   which, if it does not evaluate as ``False``, causes exception information to be
    added to the logging message. If an exception tuple (in the format returned by
    :func:`sys.exc_info`) is provided, it is used; otherwise, :func:`sys.exc_info`
    is called to get the exception information.
@@ -236,10 +236,10 @@
 
 .. method:: Logger.filter(record)
 
-   Applies this logger's filters to the record and returns a true value if the
+   Applies this logger's filters to the record and returns a ``True`` value if the
    record is to be processed. The filters are consulted in turn, until one of
-   them returns a false value. If none of them return a false value, the record
-   will be processed (passed to handlers). If one returns a false value, no
+   them returns a ``False`` value. If none of them return a ``False`` value, the record
+   will be processed (passed to handlers). If one returns a ``False`` value, no
    further processing of the record occurs.
 
 
@@ -265,7 +265,7 @@
 .. method:: Logger.handle(record)
 
    Handles a record by passing it to all handlers associated with this logger and
-   its ancestors (until a false value of *propagate* is found). This method is used
+   its ancestors (until a ``False`` value of *propagate* is found). This method is used
    for unpickled records received from a socket, as well as those created locally.
    Logger-level filtering is applied using :meth:`~Logger.filter`.
 
@@ -336,10 +336,10 @@
 
 .. method:: Handler.filter(record)
 
-   Applies this handler's filters to the record and returns a true value if the
+   Applies this handler's filters to the record and returns a ``True`` value if the
    record is to be processed. The filters are consulted in turn, until one of
-   them returns a false value. If none of them return a false value, the record
-   will be emitted. If one returns a false value, the handler will not emit the
+   them returns a ``False`` value. If none of them return a ``False`` value, the record
+   will be emitted. If one returns a ``False`` value, the handler will not emit the
    record.
 
 
@@ -548,7 +548,7 @@
    :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.
 
@@ -594,7 +594,7 @@
 |                |                         | (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``.             |
 +----------------+-------------------------+-----------------------------------------------+
@@ -740,7 +740,7 @@
    use keywords in the format string, together with a single dictionary argument.)
 
    There are two keyword arguments in *kwargs* which are inspected: *exc_info*
-   which, if it does not evaluate as false, causes exception information to be
+   which, if it does not evaluate as ``False``, causes exception information to be
    added to the logging message. If an exception tuple (in the format returned by
    :func:`sys.exc_info`) is provided, it is used; otherwise, :func:`sys.exc_info`
    is called to get the exception information.
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -1525,7 +1525,7 @@
    Return the next message in the mailbox, created with the optional *factory*
    argument passed into the mailbox object's constructor. By default this is an
    :class:`rfc822.Message` object (see the :mod:`rfc822` module).  Depending on the
-   mailbox implementation the *fp* attribute of this object may be a true file
+   mailbox implementation the *fp* attribute of this object may be a ``True`` file
    object or a class instance simulating a file object, taking care of things like
    message boundaries if multiple mail messages are contained in a single file,
    etc.  If no more messages are available, this method returns ``None``.
diff --git a/Doc/library/mimify.rst b/Doc/library/mimify.rst
--- a/Doc/library/mimify.rst
+++ b/Doc/library/mimify.rst
@@ -45,7 +45,7 @@
    :meth:`readline` method (for *infile*) or a :meth:`write` method (for
    *outfile*)) or strings naming the files.  If *infile* and *outfile* are both
    strings, they may have the same value. If the *decode_base64* argument is
-   provided and tests true, any parts that are coded in the base64 encoding are
+   provided and tests ``True``, any parts that are coded in the base64 encoding are
    decoded as well.
 
 
diff --git a/Doc/library/msvcrt.rst b/Doc/library/msvcrt.rst
--- a/Doc/library/msvcrt.rst
+++ b/Doc/library/msvcrt.rst
@@ -86,7 +86,7 @@
 
 .. function:: kbhit()
 
-   Return true if a keypress is waiting to be read.
+   Return ``True`` if a keypress is waiting to be read.
 
 
 .. function:: getch()
diff --git a/Doc/library/multifile.rst b/Doc/library/multifile.rst
--- a/Doc/library/multifile.rst
+++ b/Doc/library/multifile.rst
@@ -28,7 +28,7 @@
    :class:`MultiFile` only ever looks at the input object's :meth:`readline`,
    :meth:`seek` and :meth:`tell` methods, and the latter two are only needed if you
    want random access to the individual MIME parts. To use :class:`MultiFile` on a
-   non-seekable stream object, set the optional *seekable* argument to false; this
+   non-seekable stream object, set the optional *seekable* argument to ``False``; this
    will prevent using the input object's :meth:`seek` and :meth:`tell` methods.
 
 It will be useful to know that in :class:`MultiFile`'s view of the world, text
@@ -87,19 +87,19 @@
 .. method:: MultiFile.next()
 
    Skip lines to the next section (that is, read lines until a section-divider or
-   end-marker has been consumed).  Return true if there is such a section, false if
+   end-marker has been consumed).  Return ``True`` if there is such a section, ``False`` if
    an end-marker is seen.  Re-enable the most-recently-pushed boundary.
 
 
 .. method:: MultiFile.is_data(str)
 
-   Return true if *str* is data and false if it might be a section boundary.  As
+   Return ``True`` if *str* is data and ``False`` if it might be a section boundary.  As
    written, it tests for a prefix other than ``'-``\ ``-'`` at start of line (which
    all MIME boundaries have) but it is declared so it can be overridden in derived
    classes.
 
    Note that this test is used intended as a fast guard for the real boundary
-   tests; if it always returns false it will merely slow processing, not cause it
+   tests; if it always returns ``False`` it will merely slow processing, not cause it
    to fail.
 
 
@@ -147,7 +147,7 @@
 
 .. attribute:: MultiFile.last
 
-   True if the last end-of-file was for an end-of-message marker.
+   ``True`` if the last end-of-file was for an end-of-message marker.
 
 
 .. _multifile-example:
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -1114,7 +1114,7 @@
        print [(a.x, a.y) for a in A]
 
 
-.. highlightlang:: none
+.. highlightlang:: ``None``
 
 The results printed are ::
 
@@ -1585,7 +1585,7 @@
    .. 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::
@@ -1800,7 +1800,7 @@
    ``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
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -61,9 +61,9 @@
    to the NNTP server running on host *host*, listening at port *port*.  The
    default *port* is 119.  If the optional *user* and *password* are provided,
    or if suitable credentials are present in :file:`/.netrc` and the optional
-   flag *usenetrc* is true (the default), the ``AUTHINFO USER`` and ``AUTHINFO
+   flag *usenetrc* is ``True`` (the default), the ``AUTHINFO USER`` and ``AUTHINFO
    PASS`` commands are used to identify and authenticate the user to the server.
-   If the optional flag *readermode* is true, then a ``mode reader`` command is
+   If the optional flag *readermode* is ``True``, then a ``mode reader`` command is
    sent before authentication is performed.  Reader mode is sometimes necessary
    if you are connecting to an NNTP server on the local machine and intend to
    call reader-specific commands, such as ``group``.  If you get unexpected
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst
--- a/Doc/library/operator.rst
+++ b/Doc/library/operator.rst
@@ -451,8 +451,8 @@
    .. deprecated:: 2.0
       Use ``isinstance(x, collections.Callable)`` instead.
 
-   Returns true if the object *obj* can be called like a function, otherwise it
-   returns false.  True is returned for functions, bound and unbound methods, class
+   Returns ``True`` if the object *obj* can be called like a function, otherwise it
+   returns ``False``.  ``True`` is returned for functions, bound and unbound methods, class
    objects, and instance objects which support the :meth:`__call__` method.
 
 
@@ -461,7 +461,7 @@
    .. deprecated:: 2.7
       Use ``isinstance(x, collections.Mapping)`` instead.
 
-   Returns true if the object *obj* supports the mapping interface. This is true for
+   Returns ``True`` if the object *obj* supports the mapping interface. This is true for
    dictionaries and all instance objects defining :meth:`__getitem__`.
 
 
@@ -470,7 +470,7 @@
    .. deprecated:: 2.7
       Use ``isinstance(x, numbers.Number)`` instead.
 
-   Returns true if the object *obj* represents a number.  This is true for all
+   Returns ``True`` if the object *obj* represents a number.  This is true for all
    numeric types implemented in C.
 
 
@@ -479,7 +479,7 @@
    .. deprecated:: 2.7
       Use ``isinstance(x, collections.Sequence)`` instead.
 
-   Returns true if the object *obj* supports the sequence protocol. This returns true
+   Returns ``True`` if the object *obj* supports the sequence protocol. This returns true
    for all objects which define sequence methods in C, and for all instance objects
    defining :meth:`__getitem__`.
 
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -380,7 +380,7 @@
 Handling boolean (flag) options
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Flag options---set a variable to true or false when a particular option is seen
+Flag options---set a variable to ``True`` or ``False`` when a particular option is seen
 ---are quite common.  :mod:`optparse` supports them with two separate actions,
 ``store_true`` and ``store_false``.  For example, you might have a ``verbose``
 flag that is turned on with ``-v`` and off with ``-q``::
@@ -821,7 +821,7 @@
 
    ``version`` (default: ``None``)
       A version string to print when the user supplies a version option. If you
-      supply a true value for ``version``, :mod:`optparse` automatically adds a
+      supply a ``True`` value for ``version``, :mod:`optparse` automatically adds a
       version option with the single option string ``--version``.  The
       substring ``%prog`` is expanded the same as for ``usage``.
 
@@ -842,7 +842,7 @@
       IndentedHelpFormatter and TitledHelpFormatter.
 
    ``add_help_option`` (default: ``True``)
-      If true, :mod:`optparse` will add a help option (with option strings ``-h``
+      If ``True``, :mod:`optparse` will add a help option (with option strings ``-h``
       and ``--help``) to the parser.
 
    ``prog``
@@ -1131,12 +1131,12 @@
 
 * ``"store_true"`` [relevant: :attr:`~Option.dest`]
 
-  A special case of ``"store_const"`` that stores a true value to
+  A special case of ``"store_const"`` that stores a ``True`` value to
   :attr:`~Option.dest`.
 
 * ``"store_false"`` [relevant: :attr:`~Option.dest`]
 
-  Like ``"store_true"``, but stores a false value.
+  Like ``"store_true"``, but stores a ``False`` value.
 
   Example::
 
@@ -1392,7 +1392,7 @@
 
 .. method:: OptionParser.has_option(opt_str)
 
-   Return true if the OptionParser has an option with option string *opt_str*
+   Return ``True`` if the OptionParser has an option with option string *opt_str*
    (e.g., ``-q`` or ``--verbose``).
 
 .. method:: OptionParser.remove_option(opt_str)
@@ -2022,12 +2022,12 @@
 
      values.ensure_value(attr, value)
 
-  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
+  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.
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -127,7 +127,7 @@
    .. versionadded:: 1.5.2
 
    .. versionchanged:: 2.3
-      If :func:`os.stat_float_times` returns True, the result is a floating point
+      If :func:`os.stat_float_times` returns ``True``, the result is a floating point
       number.
 
 
@@ -140,7 +140,7 @@
    .. versionadded:: 1.5.2
 
    .. versionchanged:: 2.3
-      If :func:`os.stat_float_times` returns True, the result is a floating point
+      If :func:`os.stat_float_times` returns ``True``, the result is a floating point
       number.
 
 
@@ -173,13 +173,13 @@
 .. function:: isfile(path)
 
    Return ``True`` if *path* is an existing regular file.  This follows symbolic
-   links, so both :func:`islink` and :func:`isfile` can be true for the same path.
+   links, so both :func:`islink` and :func:`isfile` can be ``True`` for the same path.
 
 
 .. function:: isdir(path)
 
    Return ``True`` if *path* is an existing directory.  This follows symbolic
-   links, so both :func:`islink` and :func:`isdir` can be true for the same path.
+   links, so both :func:`islink` and :func:`isdir` can be ``True`` for the same path.
 
 
 .. function:: islink(path)
@@ -345,7 +345,7 @@
 
 .. data:: supports_unicode_filenames
 
-   True if arbitrary Unicode strings can be used as file names (within limitations
+   ``True`` if arbitrary Unicode strings can be used as file names (within limitations
    imposed by the file system).
 
    .. versionadded:: 2.3
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2330,7 +2330,7 @@
 
 .. function:: WEXITSTATUS(status)
 
-   If ``WIFEXITED(status)`` is true, return the integer parameter to the
+   If ``WIFEXITED(status)`` is ``True``, return the integer parameter to the
    :manpage:`exit(2)` system call.  Otherwise, the return value is meaningless.
 
    Availability: Unix.
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -281,7 +281,7 @@
    Set the key audio sampling parameters---sample format, number of channels, and
    sampling rate---in one method call.  *format*,  *nchannels*, and *samplerate*
    should be as specified in the :meth:`setfmt`, :meth:`channels`, and
-   :meth:`speed`  methods.  If *strict* is true, :meth:`setparameters` checks to
+   :meth:`speed`  methods.  If *strict* is ``True``, :meth:`setparameters` checks to
    see if each parameter was actually set to the requested value, and raises
    :exc:`OSSAudioError` if not.  Returns a tuple (*format*, *nchannels*,
    *samplerate*) indicating the parameter values that were actually set by the
diff --git a/Doc/library/parser.rst b/Doc/library/parser.rst
--- a/Doc/library/parser.rst
+++ b/Doc/library/parser.rst
@@ -183,10 +183,10 @@
    significantly faster than retrieving a tuple representation and converting that
    to nested lists.
 
-   If *line_info* is true, line number information will be included for all
+   If *line_info* is ``True``, line number information will be included for all
    terminal tokens as a third element of the list representing the token.  Note
    that the line number provided specifies the line on which the token *ends*.
-   This information is omitted if the flag is false or omitted.
+   This information is omitted if the flag is ``False`` or omitted.
 
 
 .. function:: st2tuple(ast[, line_info])
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -228,7 +228,7 @@
    The file is searched on ``sys.path``. Note that each breakpoint is assigned a
    number to which all the other breakpoint commands refer.
 
-   If a second argument is present, it is an expression which must evaluate to true
+   If a second argument is present, it is an expression which must evaluate to ``True``
    before the breakpoint is honored.
 
    Without argument, list all breaks, including for each breakpoint, the number of
@@ -258,10 +258,10 @@
    ignore count is set to 0.  A breakpoint becomes active when the ignore count is
    zero.  When non-zero, the count is decremented each time the breakpoint is
    reached and the breakpoint is not disabled and any associated condition
-   evaluates to true.
+   evaluates to ``True``.
 
 condition *bpnumber* [*condition*]
-   Condition is an expression which must evaluate to true before the breakpoint is
+   Condition is an expression which must evaluate to ``True`` before the breakpoint is
    honored.  If condition is absent, any existing condition is removed; i.e., the
    breakpoint is made unconditional.
 
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -456,7 +456,7 @@
 
    .. note::
 
-      For :term:`new-style class`\es, if :meth:`__getstate__` returns a false
+      For :term:`new-style class`\es, if :meth:`__getstate__` returns a ``False``
       value, the :meth:`__setstate__` method will not be called.
 
 .. note::
@@ -464,7 +464,7 @@
    At unpickling time, some methods like :meth:`__getattr__`,
    :meth:`__getattribute__`, or :meth:`__setattr__` may be called upon the
    instance.  In case those methods rely on some internal invariant being
-   true, the type should implement either :meth:`__getinitargs__` or
+   ``True``, the type should implement either :meth:`__getinitargs__` or
    :meth:`__getnewargs__` to establish such an invariant; otherwise, neither
    :meth:`__new__` nor :meth:`__init__` will be called.
 
@@ -499,7 +499,7 @@
 
      In the unpickling environment this object must be either a class, a
      callable registered as a "safe constructor" (see below), or it must have an
-     attribute :attr:`__safe_for_unpickling__` with a true value. Otherwise, an
+     attribute :attr:`__safe_for_unpickling__` with a ``True`` value. Otherwise, an
      :exc:`UnpicklingError` will be raised in the unpickling environment.  Note
      that as usual, the callable itself is pickled by name.
 
diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst
--- a/Doc/library/pipes.rst
+++ b/Doc/library/pipes.rst
@@ -90,7 +90,7 @@
 
 .. method:: Template.debug(flag)
 
-   If *flag* is true, turn debugging on. Otherwise, turn debugging off. When
+   If *flag* is ``True``, turn debugging on. Otherwise, turn debugging off. When
    debugging is on, commands to be executed are printed, and the shell is given
    ``set -x`` command to be more verbose.
 
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -73,12 +73,12 @@
    The output is intended to be *human readable* rather than machine parseable. It
    may look different on different platforms and this is intended.
 
-   If *aliased* is true, the function will use aliases for various platforms that
+   If *aliased* is ``True``, the function will use aliases for various platforms that
    report system names which differ from their common names, for example SunOS will
    be reported as Solaris.  The :func:`system_alias` function is used to implement
    this.
 
-   Setting *terse* to true causes the function to return only the absolute minimum
+   Setting *terse* to ``True`` causes the function to return only the absolute minimum
    information needed to identify the platform.
 
 
@@ -262,7 +262,7 @@
    look for. It defaults to a list of currently supported Linux distributions
    identified by their release file name.
 
-   If ``full_distribution_name`` is true (default), the full distribution read
+   If ``full_distribution_name`` is ``True`` (default), the full distribution read
    from the OS is returned. Otherwise the short name taken from
    ``supported_dists`` is used.
 
diff --git a/Doc/library/popen2.rst b/Doc/library/popen2.rst
--- a/Doc/library/popen2.rst
+++ b/Doc/library/popen2.rst
@@ -70,8 +70,8 @@
 
    If not using one of the helper functions to create :class:`Popen3` objects, the
    parameter *cmd* is the shell command to execute in a sub-process.  The
-   *capturestderr* flag, if true, specifies that the object should capture standard
-   error output of the child process. The default is false.  If the *bufsize*
+   *capturestderr* flag, if ``True``, specifies that the object should capture standard
+   error output of the child process. The default is ``False``.  If the *bufsize*
    parameter is specified, it specifies the size of the I/O buffers to/from the
    child process.
 
@@ -126,7 +126,7 @@
 .. attribute:: Popen3.childerr
 
    A file object that provides error output from the child process, if
-   *capturestderr* was true for the constructor, otherwise ``None``.  This will
+   *capturestderr* was ``True`` for the constructor, otherwise ``None``.  This will
    always be ``None`` for :class:`Popen4` instances.
 
 
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -33,8 +33,8 @@
    *cfile*, which defaults to *file* ``+`` ``'c'`` (``'o'`` if optimization is
    enabled in the current interpreter).  If *dfile* is specified, it is used as the
    name of the source file in error messages instead of *file*.  If *doraise* is
-   true, a :exc:`PyCompileError` is raised when an error is encountered while
-   compiling *file*. If *doraise* is false (the default), an error string is
+   ``True``, a :exc:`PyCompileError` is raised when an error is encountered while
+   compiling *file*. If *doraise* is ``False`` (the default), an error string is
    written to ``sys.stderr``, but no exception is raised.
 
 
diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -113,7 +113,7 @@
 .. method:: xmlparser.Parse(data[, isfinal])
 
    Parses the contents of the string *data*, calling the appropriate handler
-   functions to process the parsed data.  *isfinal* must be true on the final call
+   functions to process the parsed data.  *isfinal* must be ``True`` on the final call
    to this method.  *data* can be the empty string at any time.
 
 
@@ -162,19 +162,19 @@
    Control parsing of parameter entities (including the external DTD subset).
    Possible *flag* values are :const:`XML_PARAM_ENTITY_PARSING_NEVER`,
    :const:`XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE` and
-   :const:`XML_PARAM_ENTITY_PARSING_ALWAYS`.  Return true if setting the flag
+   :const:`XML_PARAM_ENTITY_PARSING_ALWAYS`.  Return ``True`` if setting the flag
    was successful.
 
 .. method:: xmlparser.UseForeignDTD([flag])
 
-   Calling this with a true value for *flag* (the default) will cause Expat to call
+   Calling this with a ``True`` value for *flag* (the default) will cause Expat to call
    the :attr:`ExternalEntityRefHandler` with :const:`None` for all arguments to
    allow an alternate DTD to be loaded.  If the document does not contain a
    document type declaration, the :attr:`ExternalEntityRefHandler` will still be
    called, but the :attr:`StartDoctypeDeclHandler` and
    :attr:`EndDoctypeDeclHandler` will not be called.
 
-   Passing a false value for *flag* will cancel a previous call that passed a true
+   Passing a ``False`` value for *flag* will cancel a previous call that passed a ``True``
    value, but otherwise has no effect.
 
    This method can only be called before the :meth:`Parse` or :meth:`ParseFile`
@@ -189,7 +189,7 @@
 
 .. attribute:: xmlparser.buffer_size
 
-   The size of the buffer used when :attr:`buffer_text` is true.
+   The size of the buffer used when :attr:`buffer_text` is ``True``.
    A new buffer size can be set by assigning a new integer value
    to this attribute.
    When the size is changed, the buffer will be flushed.
@@ -201,11 +201,11 @@
 
 .. attribute:: xmlparser.buffer_text
 
-   Setting this to true causes the :class:`xmlparser` object to buffer textual
+   Setting this to ``True`` causes the :class:`xmlparser` object to buffer textual
    content returned by Expat to avoid multiple calls to the
    :meth:`CharacterDataHandler` callback whenever possible.  This can improve
    performance substantially since Expat normally breaks character data into chunks
-   at every line ending.  This attribute is false by default, and may be changed at
+   at every line ending.  This attribute is ``False`` by default, and may be changed at
    any time.
 
    .. versionadded:: 2.3
@@ -215,7 +215,7 @@
 
    If :attr:`buffer_text` is enabled, the number of bytes stored in the buffer.
    These bytes represent UTF-8 encoded text.  This attribute has no meaningful
-   interpretation when :attr:`buffer_text` is false.
+   interpretation when :attr:`buffer_text` is ``False``.
 
    .. versionadded:: 2.3
 
@@ -226,7 +226,7 @@
    reported as a list rather than a dictionary.  The attributes are presented in
    the order found in the document text.  For each attribute, two list entries are
    presented: the attribute name and the attribute value.  (Older versions of this
-   module also used this format.)  By default, this attribute is false; it may be
+   module also used this format.)  By default, this attribute is ``False``; it may be
    changed at any time.
 
    .. versionadded:: 2.1
@@ -250,7 +250,7 @@
    attribute declarations.  Applications which set this need to be especially
    careful to use what additional information is available from the declarations as
    needed to comply with the standards for the behavior of XML processors.  By
-   default, this attribute is false; it may be changed at any time.
+   default, this attribute is ``False``; it may be changed at any time.
 
    .. versionadded:: 2.1
 
@@ -331,7 +331,7 @@
    Called when Expat begins parsing the document type declaration (``= 1``,       |
-   |         | this rounds the number to ``p`` significant digits and   |
-   |         | then formats the result in either fixed-point format     |
-   |         | or in scientific notation, depending on its magnitude.   |
-   |         |                                                          |
-   |         | The precise rules are as follows: suppose that the       |
-   |         | result formatted with presentation type ``'e'`` and      |
-   |         | precision ``p-1`` would have exponent ``exp``.  Then     |
-   |         | if ``-4 <= exp < p``, the number is formatted            |
-   |         | with presentation type ``'f'`` and precision             |
-   |         | ``p-1-exp``.  Otherwise, the number is formatted         |
-   |         | with presentation type ``'e'`` and precision ``p-1``.    |
-   |         | In both cases insignificant trailing zeros are removed   |
-   |         | from the significand, and the decimal point is also      |
-   |         | removed if there are no remaining digits following it.   |
-   |         |                                                          |
-   |         | Positive and negative infinity, positive and negative    |
-   |         | zero, and nans, are formatted as ``inf``, ``-inf``,      |
-   |         | ``0``, ``-0`` and ``nan`` respectively, regardless of    |
-   |         | the precision.                                           |
-   |         |                                                          |
-   |         | A precision of ``0`` is treated as equivalent to a       |
-   |         | precision of ``1``.                                      |
-   +---------+----------------------------------------------------------+
-   | ``'G'`` | General format. Same as ``'g'`` except switches to       |
-   |         | ``'E'`` if the number gets too large. The                |
-   |         | representations of infinity and NaN are uppercased, too. |
-   +---------+----------------------------------------------------------+
-   | ``'n'`` | Number. This is the same as ``'g'``, except that it uses |
-   |         | the current locale setting to insert the appropriate     |
-   |         | number separator characters.                             |
-   +---------+----------------------------------------------------------+
-   | ``'%'`` | Percentage. Multiplies the number by 100 and displays    |
-   |         | in fixed (``'f'``) format, followed by a percent sign.   |
-   +---------+----------------------------------------------------------+
-   | None    | The same as ``'g'``.                                     |
-   +---------+----------------------------------------------------------+
+   +----------+----------------------------------------------------------+
+   | Type     | Meaning                                                  |
+   +==========+==========================================================+
+   | ``'e'``  | Exponent notation. Prints the number in scientific       |
+   |          | notation using the letter 'e' to indicate the exponent.  |
+   +----------+----------------------------------------------------------+
+   | ``'E'``  | Exponent notation. Same as ``'e'`` except it uses an     |
+   |          | upper case 'E' as the separator character.               |
+   +----------+----------------------------------------------------------+
+   | ``'f'``  | Fixed point. Displays the number as a fixed-point        |
+   |          | number.                                                  |
+   +----------+----------------------------------------------------------+
+   | ``'F'``  | Fixed point. Same as ``'f'``.                            |
+   +----------+----------------------------------------------------------+
+   | ``'g'``  | General format.  For a given precision ``p >= 1``,       |
+   |          | this rounds the number to ``p`` significant digits and   |
+   |          | then formats the result in either fixed-point format     |
+   |          | or in scientific notation, depending on its magnitude.   |
+   |          |                                                          |
+   |          | The precise rules are as follows: suppose that the       |
+   |          | result formatted with presentation type ``'e'`` and      |
+   |          | precision ``p-1`` would have exponent ``exp``.  Then     |
+   |          | if ``-4 <= exp < p``, the number is formatted            |
+   |          | with presentation type ``'f'`` and precision             |
+   |          | ``p-1-exp``.  Otherwise, the number is formatted         |
+   |          | with presentation type ``'e'`` and precision ``p-1``.    |
+   |          | In both cases insignificant trailing zeros are removed   |
+   |          | from the significand, and the decimal point is also      |
+   |          | removed if there are no remaining digits following it.   |
+   |          |                                                          |
+   |          | Positive and negative infinity, positive and negative    |
+   |          | zero, and nans, are formatted as ``inf``, ``-inf``,      |
+   |          | ``0``, ``-0`` and ``nan`` respectively, regardless of    |
+   |          | the precision.                                           |
+   |          |                                                          |
+   |          | A precision of ``0`` is treated as equivalent to a       |
+   |          | precision of ``1``.                                      |
+   +----------+----------------------------------------------------------+
+   | ``'G'``  | General format. Same as ``'g'`` except switches to       |
+   |          | ``'E'`` if the number gets too large. The                |
+   |          | representations of infinity and NaN are uppercased, too. |
+   +----------+----------------------------------------------------------+
+   | ``'n'``  | Number. This is the same as ``'g'``, except that it uses |
+   |          | the current locale setting to insert the appropriate     |
+   |          | number separator characters.                             |
+   +----------+----------------------------------------------------------+
+   | ``'%'``  | Percentage. Multiplies the number by 100 and displays    |
+   |          | in fixed (``'f'``) format, followed by a percent sign.   |
+   +----------+----------------------------------------------------------+
+   | ``None`` | The same as ``'g'``.                                     |
+   +----------+----------------------------------------------------------+
 
 
 
@@ -945,7 +945,7 @@
 .. function:: join(words[, sep])
 
    Concatenate a list or tuple of words with intervening occurrences of  *sep*.
-   The default value for *sep* is a single space character.  It is always true that
+   The default value for *sep* is a single space character.  It is always ``True`` that
    ``string.join(string.split(s, sep), sep)`` equals *s*.
 
 
diff --git a/Doc/library/stringprep.rst b/Doc/library/stringprep.rst
--- a/Doc/library/stringprep.rst
+++ b/Doc/library/stringprep.rst
@@ -34,7 +34,7 @@
 As a result, these tables are exposed as functions, not as data structures.
 There are two kinds of tables in the RFC: sets and mappings. For a set,
 :mod:`stringprep` provides the "characteristic function", i.e. a function that
-returns true if the parameter is part of the set. For mappings, it provides the
+returns ``True`` if the parameter is part of the set. For mappings, it provides the
 mapping function: given the key, it returns the associated value. Below is a
 list of all functions available in the module.
 
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -284,7 +284,7 @@
 For the ``'?'`` format character, the return value is either :const:`True` or
 :const:`False`. When packing, the truth value of the argument object is used.
 Either 0 or 1 in the native or standard bool representation will be packed, and
-any non-zero value will be True when unpacking.
+any non-zero value will be ``True`` when unpacking.
 
 
 
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -317,8 +317,8 @@
    manner described in :ref:`converting-argument-sequence`.  This is because
    the underlying ``CreateProcess()`` operates on strings.
 
-   The *shell* argument (which defaults to *False*) specifies whether to use
-   the shell as the program to execute.  If *shell* is *True*, it is
+   The *shell* argument (which defaults to ``False``) specifies whether to use
+   the shell as the program to execute.  If *shell* is ``True``, it is
    recommended to pass *args* as a string rather than as a sequence.
 
    On Unix with ``shell=True``, the shell defaults to :file:`/bin/sh`.  If
@@ -379,10 +379,10 @@
    If *preexec_fn* is set to a callable object, this object will be called in the
    child process just before the child is executed. (Unix only)
 
-   If *close_fds* is true, all file descriptors except :const:`0`, :const:`1` and
+   If *close_fds* is ``True``, all file descriptors except :const:`0`, :const:`1` and
    :const:`2` will be closed before the child process is executed. (Unix only).
-   Or, on Windows, if *close_fds* is true then no handles will be inherited by the
-   child process.  Note that on Windows, you cannot set *close_fds* to true and
+   Or, on Windows, if *close_fds* is ``True`` then no handles will be inherited by the
+   child process.  Note that on Windows, you cannot set *close_fds* to ``True`` and
    also redirect the standard handles by setting *stdin*, *stdout* or *stderr*.
 
    If *cwd* is not ``None``, the child's current directory will be changed to *cwd*
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -166,7 +166,7 @@
       Return ``True`` if name binding introduces new namespace.
 
       If the name is used as the target of a function or class statement, this
-      will be true.
+      will be ``True``.
 
       For example::
 
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -96,7 +96,7 @@
 
 .. data:: dont_write_bytecode
 
-   If this is true, Python won't try to write ``.pyc`` or ``.pyo`` files on the
+   If this is ``True``, Python won't try to write ``.pyc`` or ``.pyo`` files on the
    import of source modules.  This value is initially set to ``True`` or
    ``False`` depending on the :option:`-B` command line option and the
    :envvar:`PYTHONDONTWRITEBYTECODE` environment variable, but you can set it
@@ -948,7 +948,7 @@
 .. function:: settscdump(on_flag)
 
    Activate dumping of VM measurements using the Pentium timestamp counter, if
-   *on_flag* is true. Deactivate these dumps if *on_flag* is off. The function is
+   *on_flag* is ``True``. Deactivate these dumps if *on_flag* is off. The function is
    available only if Python was compiled with ``--with-tsc``. To understand
    the output of this dump, read :file:`Python/ceval.c` in the Python sources.
 
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -152,7 +152,7 @@
    If *vars* is provided, it must be a dictionary of variables that will
    update the dictionary used to expand the paths.
 
-   If *expand* is set to False, the paths will not be expanded.
+   If *expand* is set to ``False``, the paths will not be expanded.
 
    If *scheme* is not an existing scheme, :func:`get_paths` will raise a
    :exc:`KeyError`.
diff --git a/Doc/library/tabnanny.rst b/Doc/library/tabnanny.rst
--- a/Doc/library/tabnanny.rst
+++ b/Doc/library/tabnanny.rst
@@ -41,7 +41,7 @@
 .. data:: filename_only
 
    Flag indicating whether to print only the filenames of files containing
-   whitespace related problems.  This is set to true by the ``-q`` option if called
+   whitespace related problems.  This is set to ``True`` by the ``-q`` option if called
    as a script.
 
 
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -67,7 +67,7 @@
    from the :attr:`name` attribute of the file object.  Whether the name can be
    used to open the file a second time, while the named temporary file is
    still open, varies across platforms (it can be so used on Unix; it cannot
-   on Windows NT or later).  If *delete* is true (the default), the file is
+   on Windows NT or later).  If *delete* is ``True`` (the default), the file is
    deleted as soon as it is closed.
 
    The returned object is always a file-like object whose :attr:`!file`
diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst
--- a/Doc/library/textwrap.rst
+++ b/Doc/library/textwrap.rst
@@ -47,7 +47,7 @@
 
 Text is preferably wrapped on whitespaces and right after the hyphens in
 hyphenated words; only then will long words be broken if necessary, unless
-:attr:`TextWrapper.break_long_words` is set to false.
+:attr:`TextWrapper.break_long_words` is set to ``False``.
 
 An additional utility function, :func:`dedent`, is provided to remove
 indentation from strings that have unwanted whitespace to the left of the text.
@@ -109,13 +109,13 @@
 
    .. attribute:: expand_tabs
 
-      (default: ``True``) If true, then all tab characters in *text* will be
+      (default: ``True``) If ``True``, then all tab characters in *text* will be
       expanded to spaces using the :meth:`expandtabs` method of *text*.
 
 
    .. attribute:: replace_whitespace
 
-      (default: ``True``) If true, after tab expansion but before wrapping,
+      (default: ``True``) If ``True``, after tab expansion but before wrapping,
       the :meth:`wrap` method will replace each whitespace character
       with a single space.  The whitespace characters replaced are
       as follows: tab, newline, vertical tab, formfeed, and carriage
@@ -123,13 +123,13 @@
 
       .. note::
 
-         If :attr:`expand_tabs` is false and :attr:`replace_whitespace` is true,
+         If :attr:`expand_tabs` is ``False`` and :attr:`replace_whitespace` is ``True``,
          each tab character will be replaced by a single space, which is *not*
          the same as tab expansion.
 
       .. note::
 
-         If :attr:`replace_whitespace` is false, newlines may appear in the
+         If :attr:`replace_whitespace` is ``False``, newlines may appear in the
          middle of a line and cause strange output. For this reason, text should
          be split into paragraphs (using :meth:`str.splitlines` or similar)
          which are wrapped separately.
@@ -137,7 +137,7 @@
 
    .. attribute:: drop_whitespace
 
-      (default: ``True``) If true, whitespace at the beginning and ending of
+      (default: ``True``) If ``True``, whitespace at the beginning and ending of
       every line (after wrapping but before indenting) is dropped.
       Whitespace at the beginning of the paragraph, however, is not dropped
       if non-whitespace follows it.  If whitespace being dropped takes up an
@@ -163,7 +163,7 @@
 
    .. attribute:: fix_sentence_endings
 
-      (default: ``False``) If true, :class:`TextWrapper` attempts to detect
+      (default: ``False``) If ``True``, :class:`TextWrapper` attempts to detect
       sentence endings and ensure that sentences are always separated by exactly
       two spaces.  This is generally desired for text in a monospaced font.
       However, the sentence detection algorithm is imperfect: it assumes that a
@@ -178,7 +178,7 @@
 
          [...] See Spot. See Spot run [...]
 
-      :attr:`fix_sentence_endings` is false by default.
+      :attr:`fix_sentence_endings` is ``False`` by default.
 
       Since the sentence detection algorithm relies on ``string.lowercase`` for
       the definition of "lowercase letter," and a convention of using two spaces
@@ -188,19 +188,19 @@
 
    .. attribute:: break_long_words
 
-      (default: ``True``) If true, then words longer than :attr:`width` will be
+      (default: ``True``) If ``True``, then words longer than :attr:`width` will be
       broken in order to ensure that no lines are longer than :attr:`width`.  If
-      it is false, long words will not be broken, and some lines may be longer
+      it is ``False``, long words will not be broken, and some lines may be longer
       than :attr:`width`.  (Long words will be put on a line by themselves, in
       order to minimize the amount by which :attr:`width` is exceeded.)
 
 
    .. attribute:: break_on_hyphens
 
-      (default: ``True``) If true, wrapping will occur preferably on whitespaces
+      (default: ``True``) If ``True``, wrapping will occur preferably on whitespaces
       and right after hyphens in compound words, as it is customary in English.
-      If false, only whitespaces will be considered as potentially good places
-      for line breaks, but you need to set :attr:`break_long_words` to false if
+      If ``False``, only whitespaces will be considered as potentially good places
+      for line breaks, but you need to set :attr:`break_long_words` to ``False`` if
       you want truly insecable words.  Default behaviour in previous versions
       was to always allow breaking hyphenated words.
 
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -80,9 +80,9 @@
    :noindex:
 
    A factory function that returns a new event object.  An event manages a flag
-   that can be set to true with the :meth:`~Event.set` method and reset to false
+   that can be set to ``True`` with the :meth:`~Event.set` method and reset to ``False``
    with the :meth:`clear` method.  The :meth:`wait` method blocks until the flag
-   is true.
+   is ``True``.
 
    See :ref:`event-objects`.
 
@@ -359,8 +359,8 @@
 
    .. attribute:: daemon
 
-      A boolean value indicating whether this thread is a daemon thread (True)
-      or not (False).  This must be set before :meth:`start` is called,
+      A boolean value indicating whether this thread is a daemon thread (``True``)
+      or not (``False``).  This must be set before :meth:`start` is called,
       otherwise :exc:`RuntimeError` is raised.  Its initial value is inherited
       from the creating thread; the main thread is not a daemon thread and
       therefore all threads created in the main thread default to :attr:`daemon`
@@ -453,12 +453,12 @@
    is unlocked, only one at a time will be able to grab ownership of the lock.
    There is no return value in this case.
 
-   When invoked with the *blocking* argument set to true, do the same thing as when
-   called without arguments, and return true.
+   When invoked with the *blocking* argument set to ``True``, do the same thing as when
+   called without arguments, and return ``True``.
 
-   When invoked with the *blocking* argument set to false, do not block.  If a call
-   without an argument would block, return false immediately; otherwise, do the
-   same thing as when called without arguments, and return true.
+   When invoked with the *blocking* argument set to ``False``, do not block.  If a call
+   without an argument would block, return ``False`` immediately; otherwise, do the
+   same thing as when called without arguments, and return ``True``.
 
 
 .. method:: RLock.release()
@@ -631,12 +631,12 @@
       pick one at random, so the order in which blocked threads are awakened
       should not be relied on.  There is no return value in this case.
 
-      When invoked with *blocking* set to true, do the same thing as when called
-      without arguments, and return true.
+      When invoked with *blocking* set to ``True``, do the same thing as when called
+      without arguments, and return ``True``.
 
-      When invoked with *blocking* set to false, do not block.  If a call
-      without an argument would block, return false immediately; otherwise, do
-      the same thing as when called without arguments, and return true.
+      When invoked with *blocking* set to ``False``, do not block.  If a call
+      without an argument would block, return ``False`` immediately; otherwise, do
+      the same thing as when called without arguments, and return ``True``.
 
    .. method:: release()
 
@@ -680,40 +680,40 @@
 This is one of the simplest mechanisms for communication between threads: one
 thread signals an event and other threads wait for it.
 
-An event object manages an internal flag that can be set to true with the
-:meth:`~Event.set` method and reset to false with the :meth:`clear` method.  The
-:meth:`wait` method blocks until the flag is true.
+An event object manages an internal flag that can be set to ``True`` with the
+:meth:`~Event.set` method and reset to ``False`` with the :meth:`clear` method.  The
+:meth:`wait` method blocks until the flag is ``True``.
 
 
 .. class:: Event()
 
-   The internal flag is initially false.
+   The internal flag is initially ``False``.
 
    .. method:: is_set()
                isSet()
 
-      Return true if and only if the internal flag is true.
+      Return ``True`` if and only if the internal flag is ``True``.
 
       .. versionchanged:: 2.6
          The ``is_set()`` syntax is new.
 
    .. method:: set()
 
-      Set the internal flag to true. All threads waiting for it to become true
-      are awakened. Threads that call :meth:`wait` once the flag is true will
+      Set the internal flag to ``True``. All threads waiting for it to become ``True``
+      are awakened. Threads that call :meth:`wait` once the flag is ``True`` will
       not block at all.
 
    .. method:: clear()
 
-      Reset the internal flag to false. Subsequently, threads calling
+      Reset the internal flag to ``False``. Subsequently, threads calling
       :meth:`wait` will block until :meth:`.set` is called to set the internal
-      flag to true again.
+      flag to ``True`` again.
 
    .. method:: wait([timeout])
 
-      Block until the internal flag is true.  If the internal flag is true on
+      Block until the internal flag is ``True``.  If the internal flag is ``True`` on
       entry, return immediately.  Otherwise, block until another thread calls
-      :meth:`.set` to set the flag to true, or until the optional timeout
+      :meth:`.set` to set the flag to ``True``, or until the optional timeout
       occurs.
 
       When the timeout argument is present and not ``None``, it should be a
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -114,7 +114,7 @@
 .. data:: accept2dyear
 
    Boolean value indicating whether two-digit year values will be accepted.  This
-   is true by default, but will be set to false if the environment variable
+   is ``True`` by default, but will be set to ``False`` if the environment variable
    :envvar:`PYTHONY2K` has been set to a non-empty string.  It may also be modified
    at run time.
 
@@ -379,7 +379,7 @@
                        tm_sec=0, tm_wday=3, tm_yday=335, tm_isdst=-1)
 
    Support for the ``%Z`` directive is based on the values contained in ``tzname``
-   and whether ``daylight`` is true.  Because of this, it is platform-specific
+   and whether ``daylight`` is ``True``.  Because of this, it is platform-specific
    except for recognizing UTC and GMT which are always known (and are considered to
    be non-daylight savings timezones).
 
diff --git a/Doc/library/token.rst b/Doc/library/token.rst
--- a/Doc/library/token.rst
+++ b/Doc/library/token.rst
@@ -28,17 +28,17 @@
 
 .. function:: ISTERMINAL(x)
 
-   Return true for terminal token values.
+   Return ``True`` for terminal token values.
 
 
 .. function:: ISNONTERMINAL(x)
 
-   Return true for non-terminal token values.
+   Return ``True`` for non-terminal token values.
 
 
 .. function:: ISEOF(x)
 
-   Return true if *x* is the marker indicating the end of input.
+   Return ``True`` if *x* is the marker indicating the end of input.
 
 
 The token constants are:
diff --git a/Doc/library/ttk.rst b/Doc/library/ttk.rst
--- a/Doc/library/ttk.rst
+++ b/Doc/library/ttk.rst
@@ -267,8 +267,8 @@
 
    .. method:: instate(statespec, callback=None, *args, **kw)
 
-      Test the widget's state. If a callback is not specified, returns True
-      if the widget state matches *statespec* and False otherwise. If callback
+      Test the widget's state. If a callback is not specified, returns ``True``
+      if the widget state matches *statespec* and ``False`` otherwise. If callback
       is specified then it is called with *args* if widget state matches
       *statespec*.
 
@@ -494,7 +494,7 @@
    .. method:: identify(x, y)
 
       Returns the name of the tab element at position *x*, *y*, or the empty
-      string if none.
+      string if ``None``.
 
 
    .. method:: index(tab_id)
diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -529,7 +529,7 @@
 
    :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.
 
@@ -1049,8 +1049,8 @@
 
    Write text - the string representation of *arg* - at the current turtle
    position according to *align* ("left", "center" or right") and with the given
-   font.  If *move* is True, the pen is moved to the bottom-right corner of the
-   text.  By default, *move* is False.
+   font.  If *move* is ``True``, the pen is moved to the bottom-right corner of the
+   text.  By default, *move* is ``False``.
 
    >>> turtle.write("Home = ", True, align="center")
    >>> turtle.write((0,0), True)
@@ -1086,7 +1086,7 @@
 
 .. function:: isvisible()
 
-   Return True if the Turtle is shown, False if it's hidden.
+   Return ``True`` if the Turtle is shown, ``False`` if it's hidden.
 
    >>> turtle.hideturtle()
    >>> turtle.isvisible()
@@ -1857,10 +1857,10 @@
    :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 startx: 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::
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -649,11 +649,11 @@
 
 .. function:: skipIf(condition, reason)
 
-   Skip the decorated test if *condition* is true.
+   Skip the decorated test if *condition* is ``True``.
 
 .. function:: skipUnless(condition, reason)
 
-   Skip the decorated test unless *condition* is true.
+   Skip the decorated test unless *condition* is ``True``.
 
 .. function:: expectedFailure
 
@@ -857,7 +857,7 @@
    .. method:: assertTrue(expr, msg=None)
                assertFalse(expr, msg=None)
 
-      Test that *expr* is true (or false).
+      Test that *expr* is ``True`` (or ``False``).
 
       Note that this is equivalent to ``bool(expr) is True`` and not to ``expr
       is True`` (use ``assertIs(expr, True)`` for the latter).  This method
@@ -877,7 +877,7 @@
    .. 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
 
@@ -1237,7 +1237,7 @@
       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
@@ -1630,7 +1630,7 @@
 
    .. attribute:: buffer
 
-      If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in between
+      If set to ``True``, ``sys.stdout`` and ``sys.stderr`` will be buffered in between
       :meth:`startTest` and :meth:`stopTest` being called. Collected output will
       only be echoed onto the real ``sys.stdout`` and ``sys.stderr`` if the test
       fails or errors. Any output is also attached to the failure / error message.
@@ -1640,7 +1640,7 @@
 
    .. attribute:: failfast
 
-      If set to true :meth:`stop` will be called on the first failure or error,
+      If set to ``True`` :meth:`stop` will be called on the first failure or error,
       halting the test run.
 
       .. versionadded:: 2.7
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
--- a/Doc/library/urllib.rst
+++ b/Doc/library/urllib.rst
@@ -250,7 +250,7 @@
    two-element tuples is used as the *query* argument, the first element of
    each tuple is a key and the second is a value. The value element in itself
    can be a sequence and in that case, if the optional parameter *doseq* is
-   evaluates to *True*, individual ``key=value`` pairs separated by ``'&'`` are
+   evaluates to ``True``, individual ``key=value`` pairs separated by ``'&'`` are
    generated for each element of the value sequence for the key.  The order of
    parameters in the encoded string will match the order of parameter tuples in
    the sequence. The :mod:`urlparse` module provides the functions
diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
--- a/Doc/library/urllib2.rst
+++ b/Doc/library/urllib2.rst
@@ -161,10 +161,10 @@
    should be the request-host of the request for the page containing the image.
 
    *unverifiable* should indicate whether the request is unverifiable, as defined
-   by RFC 2965.  It defaults to False.  An unverifiable request is one whose URL
+   by RFC 2965.  It defaults to ``False``.  An unverifiable request is one whose URL
    the user did not have the option to approve.  For example, if the request is for
    an image in an HTML document, and the user had no option to approve the
-   automatic fetching of the image, this should be true.
+   automatic fetching of the image, this should be ``True``.
 
 
 .. class:: OpenerDirector()
diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
--- a/Doc/library/urlparse.rst
+++ b/Doc/library/urlparse.rst
@@ -82,7 +82,7 @@
    scheme, to be used only if the URL does not specify one.  The default value for
    this argument is the empty string.
 
-   If the *allow_fragments* argument is false, fragment identifiers are not
+   If the *allow_fragments* argument is ``False``, fragment identifiers are not
    allowed, even if the URL's addressing scheme normally does support them.  The
    default value for this argument is :const:`True`.
 
@@ -133,13 +133,13 @@
    values are lists of values for each name.
 
    The optional argument *keep_blank_values* is a flag indicating whether blank
-   values in percent-encoded queries should be treated as blank strings.   A true value
-   indicates that blanks should be retained as  blank strings.  The default false
+   values in percent-encoded queries should be treated as blank strings.   A ``True`` value
+   indicates that blanks should be retained as  blank strings.  The default ``False``
    value indicates that blank values are to be ignored and treated as if they were
    not included.
 
    The optional argument *strict_parsing* is a flag indicating what to do with
-   parsing errors.  If false (the default), errors are silently ignored.  If true,
+   parsing errors.  If ``False`` (the default), errors are silently ignored.  If ``True``,
    errors raise a :exc:`ValueError` exception.
 
    Use the :func:`urllib.urlencode` function to convert such dictionaries into
@@ -156,13 +156,13 @@
    name, value pairs.
 
    The optional argument *keep_blank_values* is a flag indicating whether blank
-   values in percent-encoded queries should be treated as blank strings.   A true value
-   indicates that blanks should be retained as  blank strings.  The default false
+   values in percent-encoded queries should be treated as blank strings.   A ``True`` value
+   indicates that blanks should be retained as  blank strings.  The default ``False``
    value indicates that blank values are to be ignored and treated as if they were
    not included.
 
    The optional argument *strict_parsing* is a flag indicating what to do with
-   parsing errors.  If false (the default), errors are silently ignored.  If true,
+   parsing errors.  If ``False`` (the default), errors are silently ignored.  If ``True``,
    errors raise a :exc:`ValueError` exception.
 
    Use the :func:`urllib.urlencode` function to convert such lists of pairs into
diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst
--- a/Doc/library/uu.rst
+++ b/Doc/library/uu.rst
@@ -45,7 +45,7 @@
 
    :func:`decode` may print a warning to standard error if the input was produced
    by an incorrect uuencoder and Python could recover from that error.  Setting
-   *quiet* to a true value silences this warning.
+   *quiet* to a ``True`` value silences this warning.
 
 
 .. exception:: Error()
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -366,7 +366,7 @@
 
    Insert an entry into the list of :ref:`warnings filter specifications
    `.  The entry is inserted at the front by default; if
-   *append* is true, it is inserted at the end.  This checks the types of the
+   *append* is ``True``, it is inserted at the end.  This checks the types of the
    arguments, compiles the *message* and *module* regular expressions, and
    inserts them as a tuple in the list of warnings filters.  Entries closer to
    the front of the list override entries later in the list, if both match a
diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst
--- a/Doc/library/wsgiref.rst
+++ b/Doc/library/wsgiref.rst
@@ -63,7 +63,7 @@
 
    Return the full request URI, optionally including the query string, using the
    algorithm found in the "URL Reconstruction" section of :pep:`333`.  If
-   *include_query* is false, the query string is not included in the resulting URI.
+   *include_query* is ``False``, the query string is not included in the resulting URI.
 
 
 .. function:: application_uri(environ)
@@ -144,7 +144,7 @@
 
 .. function:: is_hop_by_hop(header_name)
 
-   Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header, as defined by
+   Return ``True`` if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header, as defined by
    :rfc:`2616`.
 
 
@@ -455,7 +455,7 @@
    the WSGI application object you wish to invoke.
 
    This class is a subclass of :class:`BaseCGIHandler` that sets ``wsgi.run_once``
-   to true, ``wsgi.multithread`` to false, and ``wsgi.multiprocess`` to true, and
+   to ``True``, ``wsgi.multithread`` to ``False``, and ``wsgi.multiprocess`` to ``True``, and
    always uses :mod:`sys` and :mod:`os` to obtain the necessary CGI streams and
    environment.
 
@@ -551,22 +551,22 @@
    .. attribute:: BaseHandler.wsgi_multithread
 
       The value to be used for the ``wsgi.multithread`` environment variable.  It
-      defaults to true in :class:`BaseHandler`, but may have a different default (or
+      defaults to ``True`` in :class:`BaseHandler`, but may have a different default (or
       be set by the constructor) in the other subclasses.
 
 
    .. attribute:: BaseHandler.wsgi_multiprocess
 
       The value to be used for the ``wsgi.multiprocess`` environment variable.  It
-      defaults to true in :class:`BaseHandler`, but may have a different default (or
+      defaults to ``True`` in :class:`BaseHandler`, but may have a different default (or
       be set by the constructor) in the other subclasses.
 
 
    .. attribute:: BaseHandler.wsgi_run_once
 
       The value to be used for the ``wsgi.run_once`` environment variable.  It
-      defaults to false in :class:`BaseHandler`, but :class:`CGIHandler` sets it to
-      true by default.
+      defaults to ``False`` in :class:`BaseHandler`, but :class:`CGIHandler` sets it to
+      ``True`` by default.
 
 
    .. attribute:: BaseHandler.os_environ
@@ -602,7 +602,7 @@
       default implementation uses all of the above methods and attributes, plus the
       :meth:`get_stdin`, :meth:`get_stderr`, and :meth:`add_cgi_vars` methods and the
       :attr:`wsgi_file_wrapper` attribute.  It also inserts a ``SERVER_SOFTWARE`` key
-      if not present, as long as the :attr:`origin_server` attribute is a true value
+      if not present, as long as the :attr:`origin_server` attribute is a ``True`` value
       and the :attr:`server_software` attribute is set.
 
    Methods and attributes for customizing exception handling:
@@ -675,28 +675,28 @@
 
       Override to implement platform-specific file transmission.  This method is
       called only if the application's return value is an instance of the class
-      specified by the :attr:`wsgi_file_wrapper` attribute.  It should return a true
+      specified by the :attr:`wsgi_file_wrapper` attribute.  It should return a ``True``
       value if it was able to successfully transmit the file, so that the default
       transmission code will not be executed. The default implementation of this
-      method just returns a false value.
+      method just returns a ``False`` value.
 
    Miscellaneous methods and attributes:
 
 
    .. attribute:: BaseHandler.origin_server
 
-      This attribute should be set to a true value if the handler's :meth:`_write` and
+      This attribute should be set to a ``True`` value if the handler's :meth:`_write` and
       :meth:`_flush` are being used to communicate directly to the client, rather than
       via a CGI-like gateway protocol that wants the HTTP status in a special
       ``Status:`` header.
 
-      This attribute's default value is true in :class:`BaseHandler`, but false in
+      This attribute's default value is ``True`` in :class:`BaseHandler`, but ``False`` in
       :class:`BaseCGIHandler` and :class:`CGIHandler`.
 
 
    .. attribute:: BaseHandler.http_version
 
-      If :attr:`origin_server` is true, this string attribute is used to set the HTTP
+      If :attr:`origin_server` is ``True``, this string attribute is used to set the HTTP
       version of the response set to the client.  It defaults to ``"1.0"``.
 
 
diff --git a/Doc/library/xml.dom.rst b/Doc/library/xml.dom.rst
--- a/Doc/library/xml.dom.rst
+++ b/Doc/library/xml.dom.rst
@@ -223,7 +223,7 @@
 
 .. method:: DOMImplementation.hasFeature(feature, version)
 
-   Return true if the feature identified by the pair of strings *feature* and
+   Return ``True`` if the feature identified by the pair of strings *feature* and
    *version* is implemented.
 
 
@@ -348,17 +348,17 @@
 
 .. method:: Node.hasAttributes()
 
-   Returns true if the node has any attributes.
+   Returns ``True`` if the node has any attributes.
 
 
 .. method:: Node.hasChildNodes()
 
-   Returns true if the node has any child nodes.
+   Returns ``True`` if the node has any child nodes.
 
 
 .. method:: Node.isSameNode(other)
 
-   Returns true if *other* refers to the same node as this node. This is especially
+   Returns ``True`` if *other* refers to the same node as this node. This is especially
    useful for DOM implementations which use any sort of proxy architecture (because
    more than one object can refer to the same node).
 
@@ -618,12 +618,12 @@
 
 .. method:: Element.hasAttribute(name)
 
-   Returns true if the element has an attribute named by *name*.
+   Returns ``True`` if the element has an attribute named by *name*.
 
 
 .. method:: Element.hasAttributeNS(namespaceURI, localName)
 
-   Returns true if the element has an attribute named by *namespaceURI* and
+   Returns ``True`` if the element has an attribute named by *namespaceURI* and
    *localName*.
 
 
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -394,7 +394,7 @@
 .. function:: iselement(element)
 
    Checks if an object appears to be a valid element object.  *element* is an
-   element instance.  Returns a true value if this is an element object.
+   element instance.  Returns a ``True`` value if this is an element object.
 
 
 .. function:: iterparse(source, events=None, parser=None)
@@ -550,7 +550,7 @@
    .. 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)
@@ -774,8 +774,8 @@
       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.
diff --git a/Doc/library/xml.sax.reader.rst b/Doc/library/xml.sax.reader.rst
--- a/Doc/library/xml.sax.reader.rst
+++ b/Doc/library/xml.sax.reader.rst
@@ -303,7 +303,7 @@
    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)
diff --git a/Doc/library/xmllib.rst b/Doc/library/xmllib.rst
--- a/Doc/library/xmllib.rst
+++ b/Doc/library/xmllib.rst
@@ -298,7 +298,7 @@
 .. [#] Actually, a number of keyword arguments are recognized which influence the
    parser to accept certain non-standard constructs.  The following keyword
    arguments are currently recognized.  The defaults for all of these is ``0``
-   (false) except for the last one for which the default is ``1`` (true).
+   (``False``) except for the last one for which the default is ``1`` (``True``).
    *accept_unquoted_attributes* (accept certain attribute values without requiring
    quotes), *accept_missing_endtag_name* (accept end tags that look like ````),
    *map_case* (map upper case to lower case in tags and attributes), *accept_utf8*
diff --git a/Doc/library/xmlrpclib.rst b/Doc/library/xmlrpclib.rst
--- a/Doc/library/xmlrpclib.rst
+++ b/Doc/library/xmlrpclib.rst
@@ -37,12 +37,12 @@
    :class:`SafeTransport` instance for https: URLs and an internal HTTP
    :class:`Transport` instance otherwise.  The optional third argument is an
    encoding, by default UTF-8. The optional fourth argument is a debugging flag.
-   If *allow_none* is true,  the Python constant ``None`` will be translated into
+   If *allow_none* is ``True``,  the Python constant ``None`` will be translated into
    XML; the default behaviour is for ``None`` to raise a :exc:`TypeError`. This is
    a commonly-used extension to the XML-RPC specification, but isn't supported by
    all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a
    description.  The *use_datetime* flag can be used to cause date/time values to
-   be presented as :class:`datetime.datetime` objects; this is false by default.
+   be presented as :class:`datetime.datetime` objects; this is ``False`` by default.
    :class:`datetime.datetime` objects may be passed to calls.
 
    Both the HTTP and HTTPS transports support the URL syntax extension for HTTP
@@ -507,12 +507,12 @@
 .. function:: dumps(params[, methodname[,  methodresponse[, encoding[, allow_none]]]])
 
    Convert *params* into an XML-RPC request. or into a response if *methodresponse*
-   is true. *params* can be either a tuple of arguments or an instance of the
-   :exc:`Fault` exception class.  If *methodresponse* is true, only a single value
+   is ``True``. *params* can be either a tuple of arguments or an instance of the
+   :exc:`Fault` exception class.  If *methodresponse* is ``True``, only a single value
    can be returned, meaning that *params* must be of length 1. *encoding*, if
    supplied, is the encoding to use in the generated XML; the default is UTF-8.
    Python's :const:`None` value cannot be used in standard XML-RPC; to allow using
-   it via an extension,  provide a true value for *allow_none*.
+   it via an extension,  provide a ``True`` value for *allow_none*.
 
 
 .. function:: loads(data[, use_datetime])
@@ -522,7 +522,7 @@
    ``None`` if no method name is present in the packet. If the XML-RPC packet
    represents a fault condition, this function will raise a :exc:`Fault` exception.
    The *use_datetime* flag can be used to cause date/time values to be presented as
-   :class:`datetime.datetime` objects; this is false by default.
+   :class:`datetime.datetime` objects; this is ``False`` by default.
 
    .. versionchanged:: 2.5
       The *use_datetime* flag was added.
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -117,7 +117,7 @@
    is specified but the :mod:`zlib` module is not available, :exc:`RuntimeError`
    is also raised. The default is :const:`ZIP_STORED`.  If *allowZip64* is
    ``True`` zipfile will create ZIP files that use the ZIP64 extensions when
-   the zipfile is larger than 2 GB. If it is  false (the default) :mod:`zipfile`
+   the zipfile is larger than 2 GB. If it is ``False`` (the default) :mod:`zipfile`
    will raise an exception when the ZIP file would require ZIP64 extensions.
    ZIP64 extensions are disabled by default because the default :program:`zip`
    and :program:`unzip` commands on Unix (the InfoZIP utilities) don't support
diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -115,7 +115,7 @@
 
    .. method:: is_package(fullname)
 
-      Return True if the module specified by *fullname* is a package. Raise
+      Return ``True`` if the module specified by *fullname* is a package. Raise
       :exc:`ZipImportError` if the module couldn't be found.