Skip to content

Commit

Permalink
[3.9] bpo-46732: fix __bool__ docstring (pythonGH-31301) (pythonGH-31474
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 0a222db)


Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
2 people authored and hello-adam committed Jun 2, 2022
1 parent 185fdb0 commit 2d3ec9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -0,0 +1,2 @@
Correct the docstring for the :meth:`__bool__` method. Patch by Jelle
Zijlstra.
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Expand Up @@ -7236,7 +7236,7 @@ static slotdef slotdefs[] = {
UNSLOT("__abs__", nb_absolute, slot_nb_absolute, wrap_unaryfunc,
"abs(self)"),
UNSLOT("__bool__", nb_bool, slot_nb_bool, wrap_inquirypred,
"self != 0"),
"True if self else False"),
UNSLOT("__invert__", nb_invert, slot_nb_invert, wrap_unaryfunc, "~self"),
BINSLOT("__lshift__", nb_lshift, slot_nb_lshift, "<<"),
RBINSLOT("__rlshift__", nb_lshift, slot_nb_lshift, "<<"),
Expand Down

0 comments on commit 2d3ec9a

Please sign in to comment.