10000 updated docstring on __bool__ to match behavior · python/cpython@030debb · GitHub
[go: up one dir, main page]

Skip to content

Commit 030debb

Browse files
committed
updated docstring on __bool__ to match behavior
1 parent 4dafcc4 commit 030debb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/decimal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,10 @@ def _check_nans(self, other = None, context=None):
634634
return 0
635635

636636
def __bool__(self):
637-
"""Is the number non-zero?
637+
"""return True if the number is non-zero.
638638
639-
0 if self == 0
640-
1 if self != 0
639+
False if self == 0
640+
True if self != 0
641641
"""
642642
if self._is_special:
643643
return True

0 commit comments

Comments
 (0)
0