pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/0a222db2bca63070f429c0e613707da1bdfaf0e0

stylesheet" href="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> fix __bool__ docstring (GH-31301) · python/cpython@0a222db · GitHub
Skip to content

Commit 0a222db

Browse files
fix __bool__ docstring (GH-31301)
1 parent 2cae938 commit 0a222db

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Correct the docstring for the :meth:`__bool__` method. Patch by Jelle
2+
Zijlstra.

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8065,7 +8065,7 @@ static slotdef slotdefs[] = {
80658065
UNSLOT("__abs__", nb_absolute, slot_nb_absolute, wrap_unaryfunc,
80668066
"abs(self)"),
80678067
UNSLOT("__bool__", nb_bool, slot_nb_bool, wrap_inquirypred,
8068-
"self != 0"),
8068+
"True if self else False"),
80698069
UNSLOT("__invert__", nb_invert, slot_nb_invert, wrap_unaryfunc, "~self"),
80708070
BINSLOT("__lshift__", nb_lshift, slot_nb_lshift, "<<"),
80718071
RBINSLOT("__rlshift__", nb_lshift, slot_nb_lshift, "<<"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy