diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-05-30 20:52:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 20:52:44 (GMT) |
commit | 207d1b032fdc7f8921de220c29807925d1afa99b (patch) | |
tree | 29c9c3758c94ccbd57c0ddf8470f3e1264c7e802 /Python/errors.c | |
parent | 2e31e5695d9c58cab4569a53cf097badd1141a5b (diff) | |
download | cpython-207d1b032fdc7f8921de220c29807925d1afa99b.zip cpython-207d1b032fdc7f8921de220c29807925d1afa99b.tar.gz cpython-207d1b032fdc7f8921de220c29807925d1afa99b.tar.bz2 |
[3.12] gh-109218: Improve documentation for the complex() constructor (GH-119687) (ПР-119805)
* 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.)
(cherry picked from commit ec1ba264607b2b7b98d2602f5536a1d02981efc6)
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions