diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-05-30 20:20:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 20:20:07 (GMT) |
commit | ec1ba264607b2b7b98d2602f5536a1d02981efc6 (patch) | |
tree | 6803200390bd836aa0841cc5f35971fedcebef9f /Lib/test/test_pyrepl/support.py | |
parent | 1c04c63ced5038e8f45a2aac7dc45f0815a4ddc5 (diff) | |
download | cpython-ec1ba264607b2b7b98d2602f5536a1d02981efc6.zip cpython-ec1ba264607b2b7b98d2602f5536a1d02981efc6.tar.gz cpython-ec1ba264607b2b7b98d2602f5536a1d02981efc6.tar.bz2 |
gh-109218: Improve documentation for the complex() constructor (GH-119687)
* Remove the equivalence with real+imag*1j which can be incorrect in corner
cases (non-finite numbers, the sign of zeroes).
* Separately document the three roles of the constructor: parsing a string,
converting a number, and constructing a complex from components.
* Document positional-only parameters of complex(), float(), int() and bool()
as positional-only.
* Add examples for complex() and int().
* Specify the grammar of the string for complex().
* Improve the grammar of the string for float().
* Describe more explicitly the behavior when real and/or imag arguments are
complex numbers. (This will be deprecated in future.)
Diffstat (limited to 'Lib/test/test_pyrepl/support.py')
0 files changed, 0 insertions, 0 deletions