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 0x0.0p+0.

If someone wants to write the patch to deprecate this behaviour in Python 3.5 
(reporting a deprecation warning whenever midnight is interpreted as False, 
perhaps suggesting the use of "is" or "is not" instead), and then actually 
change the behaviour in 3.6, I don't believe we should actively oppose them 
from doing so.

See also issue #13936.

----------
components: Interpreter Core
keywords: easy
messages: 212772
nosy: belopolsky, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: RFE: change bool(0.0) to evaluate as True
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20855>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to