]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109218: Deprecate weird cases in the complex() constructor (GH-119620)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 30 May 2024 20:30:57 +0000 (23:30 +0300)
committerGitHub <noreply@github.com>
Thu, 30 May 2024 20:30:57 +0000 (23:30 +0300)
commitef01e95ae3659015c2ebe4ecdc048aadcda89930
tree25ad995975f9fc600a9b3c8bb0030435b30fed6c
parentdeda85717b2557c6bad8b9a51719c60ac510818f
gh-109218: Deprecate weird cases in the complex() constructor (GH-119620)

* Passing a string as the "real" keyword argument is now an error;
  it should only be passed as a single positional argument.
* Passing a complex number as the "real" or "imag" argument is now deprecated;
  it should only be passed as a single positional argument.
Doc/library/functions.rst
Doc/whatsnew/3.14.rst
Lib/test/test_complex.py
Lib/test/test_fractions.py
Misc/NEWS.d/next/Core and Builtins/2024-05-27-19-13-49.gh-issue-109218.-sdDg0.rst [new file with mode: 0644]
Objects/complexobject.c