[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-06 Thread Mark Dickinson
Mark Dickinson added the comment: I realise this was opened as a joke, but I actually consider this suggestion to be unridiculous. I've never felt comfortable with code that does if x rather than if x != 0.0 for x a float. What really makes this a no-go in Python is the equality between

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: The rationale for making this change is that the current behaviour converts a stylistic problem in checking values against a sentinel via bool(value) instead of value is not None into a subtle data driven behavioural bug that only occurs exactly at

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Donald Stufft
Donald Stufft added the comment: Being passive aggressive is pointless, if you disagree then discuss on the actual issue or on the mailing list thread. Opening up random issues because you're mad just makes you look like a child. -- nosy: +dstufft resolution: - invalid status: open -

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: -belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20855 ___ ___

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20855 ___ ___

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I thought literal copying was enough of a hint to humor without a smiley in the title. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20855 ___

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Tim Peters
Tim Peters added the comment: Excellent idea! But then we should change bool(0.1) to be False too ;-) -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20855 ___

[issue20855] RFE: change bool(0.0) to evaluate as True

2014-03-05 Thread Nick Coghlan
Nick Coghlan added the comment: Alexander, my goal is to flip the default assumption in the time discussion. It is clear from the documentation that the current behaviour is intentional, but there is no concrete *use case* given for it. This is in stark contrast to the other types where