Issue 28955: Not matched behavior of numeric comparison with the documentation (original) (raw)
Issue28955
Created on 2016-12-13 04:09 by woo yoo, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 5982 | merged | anthony-flury,2018-03-05 08:55 | |
PR 9315 | merged | miss-islington,2018-09-14 17:49 |
Messages (5) | ||
---|---|---|
msg283069 - (view) | Author: woo yoo (woo yoo) | Date: 2016-12-13 04:09 |
According to the documentation, which said "Additionally, comparing any number to a not-a-number value will return False. ",the comparison of `float('nan')!= 1`should yield False, while the result is True. Small errors like this in documentation should be corrected? The related link https://docs.python.org/3/reference/expressions.html#value-comparisons | ||
msg283070 - (view) | Author: woo yoo (woo yoo) | Date: 2016-12-13 04:13 |
Maybe the description should be changed into "all order comparisons of not-a-number and any number will return False" | ||
msg283096 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2016-12-13 11:45 |
Sure, we like to make the docs more precise when it doesn't interfere with the presentation. Perhaps something like: "Additionally, ordering comparisions involving not-a-number values will always return False." I wonder if we should also mention here that this follows the IEEE standard. | ||
msg325373 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2018-09-14 17:48 |
New changeset ad8a0004206ba7aec5a8a60fce413da718080db2 by Benjamin Peterson (Tony Flury) in branch 'master': closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982) https://github.com/python/cpython/commit/ad8a0004206ba7aec5a8a60fce413da718080db2 | ||
msg325377 - (view) | Author: miss-islington (miss-islington) | Date: 2018-09-14 18:05 |
New changeset ca2fa2841f8e3ce5213a0e8c0abc1d0fdc7d386b by Miss Islington (bot) in branch '3.7': closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982) https://github.com/python/cpython/commit/ca2fa2841f8e3ce5213a0e8c0abc1d0fdc7d386b |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:40 | admin | set | github: 73141 |
2018-09-14 18:05:45 | miss-islington | set | nosy: + miss-islingtonmessages: + |
2018-09-14 17:49:06 | miss-islington | set | pull_requests: + <pull%5Frequest8740> |
2018-09-14 17:48:54 | benjamin.peterson | set | status: open -> closednosy: + benjamin.petersonmessages: + resolution: fixedstage: patch review -> resolved |
2018-03-05 12:06:01 | serhiy.storchaka | set | nosy: + mark.dickinson |
2018-03-05 08:55:45 | anthony-flury | set | keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest5748> |
2018-03-04 13:22:12 | cheryl.sabella | set | keywords: + easystage: needs patchtype: behavior -> enhancementversions: + Python 3.7, Python 3.8, - Python 3.5 |
2016-12-13 11:45:13 | r.david.murray | set | nosy: + r.david.murraymessages: + |
2016-12-13 04:13:07 | woo yoo | set | messages: + |
2016-12-13 04:09:31 | woo yoo | create |