Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/builtins/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ are always available. They are listed here in alphabetical order.
>>> MISSING
<MISSING>

Sentinel objects are truthy and compare equal only to themselves. They are
Sentinel objects are true and compare equal only to themselves. They are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this particular context I would say:

Suggested change
Sentinel objects are true and compare equal only to themselves. They are
Sentinel objects are true in a boolean context and compare equal only to themselves. They are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Sentinel objects evaluate as true"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still unnecessary and ugly, if not even wrong. "Are/is true" is how the documentation does it.

intended to be compared with the :keyword:`is` operator.

``sentinel`` does not support subclassing.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/smtplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
An :class:`SMTP` instance encapsulates an SMTP connection. It has methods
that support a full repertoire of SMTP and ESMTP operations.

If the host parameter is set to a truthy value, :meth:`SMTP.connect` is called with
If the host parameter is set to a true value, :meth:`SMTP.connect` is called with
host and port automatically when the object is created; otherwise, :meth:`!connect` must
be called manually.

Expand Down Expand Up @@ -88,7 +88,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
required from the beginning of the connection and using :meth:`SMTP.starttls` is
not appropriate.

If the host parameter is set to a truthy value, :meth:`SMTP.connect` is called with host
If the host parameter is set to a true value, :meth:`SMTP.connect` is called with host
and port automatically when the object is created; otherwise, :meth:`!SMTP.connect` must
be called manually.

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/tkinter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6747,13 +6747,13 @@ and :mod:`!tkinter.constants` namespaces.
YES
ON

Truthy values, all equal to the integer ``1``.
True values, all equal to the integer ``1``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though True here is not marked up as being the boolean constant, I think this could still lead to confusion. Since the actual code uses 0 and 1 and not the booleans, I would rephrase this as:

All equal to ``1``, and so true in a boolean context.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we could just drop the mention of boolean altogether and just say "All equal to 1", which is in fact the case. Python programmers will know that 1 is true.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sentence describes tkinter's TRUE, YES and ON. Clearly being true is the point, and equality to 1 is a side note. I'd have to see how they're usually used, but saying only "equal to 1" might make people focus on the number value and write worse code.


.. data:: FALSE
NO
OFF

Falsy values, all equal to the integer ``0``.
False values, all equal to the integer ``0``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here.


.. data:: N
S
Expand Down
Loading