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.

Author francois-durand
Recipients francois-durand
Date 2020-01-09.12:43:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578573831.64.0.0454191861618.issue39274@roundup.psfhosted.org>
In-reply-to
Content
As of now, fractions.Fraction.__bool__ is implemented as: ``return a._numerator != 0``. However, this does not necessary return a bool (which would be desired). In particular, when the numerator is a numpy integer, this returns a numpy bool instead. Another solution would be to implement fractions.Fraction.__bool__ as: ``return bool(numerator)``. What do you think?

This message follows a thread here: https://github.com/numpy/numpy/issues/15277 .
History
Date User Action Args
2020-01-09 12:43:51francois-durandsetrecipients: + francois-durand
2020-01-09 12:43:51francois-durandsetmessageid: <1578573831.64.0.0454191861618.issue39274@roundup.psfhosted.org>
2020-01-09 12:43:51francois-durandlinkissue39274 messages
2020-01-09 12:43:51francois-durandcreate