DAGDA SEARCH | Back to results | Support

Message 384970 - Python tracker

Source: https://bugs.python.org/msg384970

homepage

Message384970 ➜

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 gvanrossum
Recipients Mark.Shannon, Mohamed_Atef, ethan.furman, gregory.p.smith, gvanrossum, pablogsal, serhiy.storchaka, stestagg
Date 2021-01-12.18:09:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610474953.15.0.916420769997.issue42899@roundup.psfhosted.org>
In-reply-to
Content
Hm, I hadn't realized the issue of bool(a) being evaluated once or twice.

The most important side effect that bool(a) can have is raising (as e.g. numpy arrays do), not producing random results. Another important side effect might be loading some value into a cache.

So I think dropping an *extra* call is fine, while dropping the *only* call is not.
History
Date User Action Args
2021-01-12 18:09:13gvanrossumsetrecipients: + gvanrossum, gregory.p.smith, ethan.furman, Mark.Shannon, serhiy.storchaka, Mohamed_Atef, pablogsal, stestagg
2021-01-12 18:09:13gvanrossumsetmessageid: <1610474953.15.0.916420769997.issue42899@roundup.psfhosted.org>
2021-01-12 18:09:13gvanrossumlinkissue42899 messages
2021-01-12 18:09:13gvanrossumcreate
Supported by The Python Software Foundation,
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements