[issue40177] Python Language Reference Documentation

2020-04-05 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks for the report! Now fixed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18747
pull_request: https://github.com/python/cpython/pull/19384

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +18746
pull_request: https://github.com/python/cpython/pull/19383

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-04 Thread Mark Dickinson


Change by Mark Dickinson :


--
keywords: +patch
pull_requests: +18718
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19357

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Oh never mind, I'm just going to slink away now and stop posting corrections 
when distracted...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Oops, that should be

... ``x == x``, ``3 < x``, and ``x > 3`` are all false ...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

How about this?


"The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are
special. Not-a-number values always compare unordered and unequal to any other 
value, including themselves. For example, if ``x = float('NaN')``, then ``x == 
x``, ``3 < x``, and ``x < 3`` are all false, but ``x != x`` is true. This 
behavior is compliant with the IEEE 754 standard."


Due to technology problems at my end, I cannot submit a PR for this, but this 
should be an easy issue. If somebody wants to use the text above as a start, 
please feel free to do so.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +mark.dickinson, rhettinger, stutzbach

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40177] Python Language Reference Documentation

2020-04-03 Thread Arnuld

New submission from Arnuld :

In section "6.10.1 Value comparisons", it is written:

https://docs.python.org/3/reference/expressions.html

"The not-a-number values float('NaN') and decimal.Decimal('NaN') are
special. Any ordered comparison of a number to a not-a-number value is
false. A counter-intuitive implication is that not-a-number values are
not equal to themselves. For example, if x = float('NaN'), 3 < x, x <
3, x == x, x != x are all false. This behavior is compliant with IEEE
754."

Last comparison "x != x" does not return False, it returns True. Here is the 
output from my iPython interpeter I am using on Arch Linux (latest as of today):

In [86]: x == y
Out[86]: False

In [87]: x != y
Out[87]: True


I verified the bug it on Wikipedia too:

https://en.wikipedia.org/wiki/NaN#Comparison_with_NaN

--
assignee: docs@python
components: Documentation
files: Screenshot_2020-04-04 6 Expressions — Python 3 8 2 documentation.png
messages: 365742
nosy: ArnuldOnData, docs@python
priority: normal
severity: normal
status: open
title: Python Language Reference Documentation
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49033/Screenshot_2020-04-04 6 
Expressions — Python 3 8 2 documentation.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com