Sergey B Kirpichev <skirpic...@gmail.com> added the comment: 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'.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com