Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
26d936a7
Commit
26d936a7
authored
Nov 29, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19795: Improved markup of True/False constants.
parent
71142c4e
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
50 additions
and
45 deletions
+50
-45
Doc/howto/functional.rst
Doc/howto/functional.rst
+2
-2
Doc/library/ast.rst
Doc/library/ast.rst
+1
-1
Doc/library/bdb.rst
Doc/library/bdb.rst
+4
-4
Doc/library/cookielib.rst
Doc/library/cookielib.rst
+8
-8
Doc/library/ctypes.rst
Doc/library/ctypes.rst
+1
-1
Doc/library/email.message.rst
Doc/library/email.message.rst
+1
-1
Doc/library/functions.rst
Doc/library/functions.rst
+3
-3
Doc/library/gc.rst
Doc/library/gc.rst
+2
-2
Doc/library/io.rst
Doc/library/io.rst
+1
-1
Doc/library/itertools.rst
Doc/library/itertools.rst
+2
-2
Doc/library/os.path.rst
Doc/library/os.path.rst
+3
-3
Doc/library/sqlite3.rst
Doc/library/sqlite3.rst
+4
-4
Doc/library/ssl.rst
Doc/library/ssl.rst
+1
-1
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+1
-1
Doc/library/struct.rst
Doc/library/struct.rst
+1
-1
Doc/library/ttk.rst
Doc/library/ttk.rst
+4
-4
Doc/library/turtle.rst
Doc/library/turtle.rst
+3
-3
Doc/library/urllib2.rst
Doc/library/urllib2.rst
+1
-1
Doc/library/zipimport.rst
Doc/library/zipimport.rst
+1
-1
Doc/reference/datamodel.rst
Doc/reference/datamodel.rst
+1
-1
Misc/NEWS
Misc/NEWS
+5
-0
No files found.
Doc/howto/functional.rst
View file @
26d936a7
...
...
@@ -743,8 +743,8 @@ the constructed list's ``.sort()`` method. ::
Python wiki at http://wiki.python.org/moin/HowTo/Sorting.)
The ``any(iter)`` and ``all(iter)`` built-ins look at the truth values of an
iterable's contents. :func:`any` returns
True
if any element in the iterable is
a true value, and :func:`all` returns
True
if all of the elements are true
iterable's contents. :func:`any` returns
``True``
if any element in the iterable is
a true value, and :func:`all` returns
``True``
if all of the elements are true
values:
>>> any([0,1,0])
...
...
Doc/library/ast.rst
View file @
26d936a7
...
...
@@ -257,6 +257,6 @@ and classes for traversing abstract syntax trees:
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``.
Doc/library/bdb.rst
View file @
26d936a7
...
...
@@ -186,17 +186,17 @@ The :mod:`bdb` module also defines two classes:
.. 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)
...
...
@@ -237,7 +237,7 @@ The :mod:`bdb` module also defines two classes:
.. 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.
...
...
Doc/library/cookielib.rst
View file @
26d936a7
...
...
@@ -98,7 +98,7 @@ The following classes are provided:
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
...
...
@@ -652,7 +652,7 @@ internal consistency, so you should know what you're doing if you do that.
.. 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 @@ internal consistency, so you should know what you're doing if you do that.
.. attribute:: Cookie.discard
True
if this is a session cookie.
``True``
if this is a session cookie.
.. attribute:: Cookie.comment
...
...
@@ -680,7 +680,7 @@ internal consistency, so you should know what you're doing if you do that.
.. 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 @@ internal consistency, so you should know what you're doing if you do that.
.. 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
...
...
@@ -729,7 +729,7 @@ The :class:`Cookie` class also defines the following method:
.. 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.
...
...
Doc/library/ctypes.rst
View file @
26d936a7
...
...
@@ -2351,7 +2351,7 @@ These are the fundamental ctypes data types:
.. 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
...
...
Doc/library/email.message.rst
View file @
26d936a7
...
...
@@ -68,7 +68,7 @@ Here are the methods of the :class:`Message` class:
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)
...
...
Doc/library/functions.rst
View file @
26d936a7
...
...
@@ -47,7 +47,7 @@ available. They are listed here in alphabetical order.
.. 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):
...
...
@@ -61,8 +61,8 @@ available. They are listed here in alphabetical order.
.. 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:
...
...
Doc/library/gc.rst
View file @
26d936a7
...
...
@@ -142,8 +142,8 @@ The :mod:`gc` module provides the following functions:
.. 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
...
...
Doc/library/io.rst
View file @
26d936a7
...
...
@@ -278,7 +278,7 @@ I/O Base Classes
.. 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)
...
...
Doc/library/itertools.rst
View file @
26d936a7
...
...
@@ -52,8 +52,8 @@ Iterator Arguments Results
: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
T
rue ``ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9``
:func:`ifilterfalse` pred, seq elements of seq where pred(elem) is
F
alse ``ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``
:func:`ifilter` pred, seq elements of seq where pred(elem) is
t
rue ``ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9``
:func:`ifilterfalse` pred, seq elements of seq where pred(elem) is
f
alse ``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``
...
...
Doc/library/os.path.rst
View file @
26d936a7
...
...
@@ -127,7 +127,7 @@ the :mod:`glob` module.)
.. 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 @@ the :mod:`glob` module.)
.. 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.
...
...
@@ -345,7 +345,7 @@ the :mod:`glob` module.)
.. 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
...
...
Doc/library/sqlite3.rst
View file @
26d936a7
...
...
@@ -234,10 +234,10 @@ Module functions and constants
.. function:: enable_callback_tracebacks(flag)
By default you will not get any tracebacks in user-defined functions,
aggregates, converters, authorizer callbacks etc. If you want to debug them,
you
can call this function with *flag* as True. Afterwards, you will get tracebacks
from callbacks on ``sys.stderr``. Use :const:`False` to disable the feature
again.
aggregates, converters, authorizer callbacks etc. If you want to debug them,
you can call this function with *flag* set to ``True``. Afterwards, you will
get tracebacks from callbacks on ``sys.stderr``. Use :const:`False` to
disable the feature
again.
.. _sqlite3-connection-objects:
...
...
Doc/library/ssl.rst
View file @
26d936a7
...
...
@@ -166,7 +166,7 @@ Functions, Constants, and Exceptions
.. function:: RAND_status()
Returns
True
if the SSL pseudo-random number generator has been seeded with
Returns
``True``
if the SSL pseudo-random number generator has been seeded with
'enough' randomness, and False otherwise. You can use :func:`ssl.RAND_egd`
and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random
number generator.
...
...
Doc/library/stdtypes.rst
View file @
26d936a7
...
...
@@ -1783,7 +1783,7 @@ The constructors for both classes work the same:
.. method:: isdisjoint(other)
Return
True
if the set has no elements in common with *other*. Sets are
Return
``True``
if the set has no elements in common with *other*. Sets are
disjoint if and only if their intersection is the empty set.
.. versionadded:: 2.6
...
...
Doc/library/struct.rst
View file @
26d936a7
...
...
@@ -284,7 +284,7 @@ platforms use 32-bit pointers and will use a Python integer.
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.
...
...
Doc/library/ttk.rst
View file @
26d936a7
...
...
@@ -267,8 +267,8 @@ Besides the methods described below, the :class:`ttk.Widget` class supports the
.. 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*.
...
...
@@ -919,7 +919,7 @@ ttk.Treeview
.. method:: exists(item)
Returns
True
if the specified *item* is present in the tree.
Returns
``True``
if the specified *item* is present in the tree.
.. method:: focus([item=None])
...
...
@@ -1065,7 +1065,7 @@ ttk.Treeview
Ensure that *item* is visible.
Sets all of *item*'s ancestors open option to
True
, and scrolls the
Sets all of *item*'s ancestors open option to
``True``
, and scrolls the
widget if necessary so that *item* is within the visible portion of
the tree.
...
...
Doc/library/turtle.rst
View file @
26d936a7
...
...
@@ -1049,8 +1049,8 @@ More drawing control
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
T
rue, the pen is moved to the bottom-right corner of the
text. By default, *move* is
False
.
font. If *move* is
t
rue, 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 @@ Visibility
.. 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()
...
...
Doc/library/urllib2.rst
View file @
26d936a7
...
...
@@ -166,7 +166,7 @@ The following classes are provided:
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.
...
...
Doc/library/zipimport.rst
View file @
26d936a7
...
...
@@ -115,7 +115,7 @@ zipimporter Objects
.. 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.
...
...
Doc/reference/datamodel.rst
View file @
26d936a7
...
...
@@ -207,7 +207,7 @@ Ellipsis
single: True
These represent the truth values False and True. The two objects
representing the values
False and True
are the only Boolean objects.
representing the values
``False`` and ``True``
are the only Boolean objects.
The Boolean type is a subtype of plain integers, and Boolean values
behave like the values 0 and 1, respectively, in almost all contexts,
the exception being that when converted to a string, the strings
...
...
Misc/NEWS
View file @
26d936a7
...
...
@@ -67,6 +67,11 @@ Tests
-
Issue
#
19085
:
Added
basic
tests
for
all
tkinter
widget
options
.
Documentation
-------------
-
Issue
#
19795
:
Improved
markup
of
True
/
False
constants
.
Whats
' New in Python 2.7.6?
===========================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment