This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sergey.Kirpichev
Recipients Sergey.Kirpichev, veky
Date 2021-06-09.06:34:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <YMBg58HJ4ToGT+cB@note>
In-reply-to <1623219502.06.0.242287164256.issue44346@roundup.psfhosted.org>
Content
On Wed, Jun 09, 2021 at 06:18:22AM +0000, Vedran Čačić wrote:
> I was surprised to realize `complex` doesn't accept '2 + 3j'

Good catch, probably that should be allowed too.

> e.g. how about 3_j?

The PEP 515 added '_' as a separator between digits.  But the
imaginary unit is not a digit.  For same reason '1_/_2' shouldn't
be allowed for the Rational constructor.  (Unfortunately, the
Decimal class breaks this PEP convention as well as some other,
see issue44267.  For example, it accepts things like '1_._2'.)
History
Date User Action Args
2021-06-09 06:34:23Sergey.Kirpichevsetrecipients: + Sergey.Kirpichev, veky
2021-06-09 06:34:23Sergey.Kirpichevlinkissue44346 messages
2021-06-09 06:34:22Sergey.Kirpichevcreate