[New-bugs-announce] [issue46732] object.__bool__ docstring is wrong

Jelle Zijlstra report at bugs.python.org
Sat Feb 12 14:10:01 EST 2022


New submission from Jelle Zijlstra <jelle.zijlstra at gmail.com>:

>>> None.__bool__.__doc__
'self != 0'

This isn't true, since None does not equal 0. I suggest rewording it to "True if self else False".

----------
assignee: Jelle Zijlstra
components: Interpreter Core
messages: 413141
nosy: Jelle Zijlstra
priority: normal
severity: normal
status: open
title: object.__bool__ docstring is wrong
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46732>
_______________________________________


More information about the New-bugs-announce mailing list