[issue46677] TypedDict docs are incomplete

2022-02-14 Thread Charlie Zhao
Change by Charlie Zhao : -- keywords: +patch pull_requests: +29498 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31349 ___ Python tracker <https://bugs.python.org/issu

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29907 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/31808 ___ Python tracker <https://bugs.python.org/issu

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29913 pull_request: https://github.com/python/cpython/pull/31815 ___ Python tracker <https://bugs.python.org/issue46

[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-24 Thread Charlie Zhao
Charlie Zhao added the comment: > "Due to the requirements of the `IEEE-754 standard > <https://en.wikipedia.org/wiki/IEEE_754>`_, math.nan and float('nan') are > never equal to any other value, including themselves. Use math.isnan to test > for NANs." It seems

[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-29 Thread Charlie Zhao
Charlie Zhao added the comment: I started a PR and some simple examples were added. It is helpful for those who are new to IEEE-754. According to Jelle's comments, the behavior of `float('nan') is float('nan')` may be changed in the future, so I just omit it and suggest users to use

[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-28 Thread Charlie Zhao
Change by Charlie Zhao : -- keywords: +patch pull_requests: +30248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32170 ___ Python tracker <https://bugs.python.org/issu

[issue45735] Promise the long-time truth that `args=list` works

2022-01-27 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29161 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30982 ___ Python tracker <https://bugs.python.org/issu

[issue46677] TypedDict docs are incomplete

2022-02-11 Thread Charlie Zhao
Charlie Zhao added the comment: Indeed, if you use Python keywords or other invalid Python names as keys of TypedDict, we must use the equivalent forms as follows: ``` Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'in': str}) # OK Point2D = TypedDict('Point2D', x=int, y=int, in=str