mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
updated docstring on __bool__ to match behavior
This commit is contained in:
parent
4dafcc4ece
commit
030debb954
1 changed files with 3 additions and 3 deletions
|
@ -634,10 +634,10 @@ class Decimal(object):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
"""Is the number non-zero?
|
"""return True if the number is non-zero.
|
||||||
|
|
||||||
0 if self == 0
|
False if self == 0
|
||||||
1 if self != 0
|
True if self != 0
|
||||||
"""
|
"""
|
||||||
if self._is_special:
|
if self._is_special:
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue