Message 346870 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
Not a bug.  Both function docs say "reverse is a boolean value."
https://docs.python.org/3/library/stdtypes.html#boolean-values
says "Boolean values are the two constant objects False and True."  These should be used in new code.

For compatibility with old code, CPython generally allows 0 and 1.  In this case, it allows any 'integral value', but I would not necessarily expect this of other implementations.

[In general, the *Python language* docs do not document extra latitude allowed by the *CPython implementation*.  So the lack thereof here is also not a bug.]

All objects without fancy trickery have a __bool__ method, either inherited from *object* or overridden.  This in no way makes all such objects, including Xs, into boolean values.