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 manishearth
Recipients manishearth
Date 2016-09-19.07:41:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474270906.0.0.604707439727.issue28203@psf.upfronthosting.co.za>
In-reply-to
Content
When the second argument of complex() is not a number/string, the type error reports the error but prints the type of the first argument:

    > complex({1:2},1j)
    Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
    TypeError: complex() argument must be a string or a number, not 'dict'
    >complex(1j,{1:2})
    Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
    TypeError: complex() argument must be a string or a number, not 'complex'
    >>> complex(1, {1:2})
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: complex() argument must be a string or a number, not 'int'
History
Date User Action Args
2016-09-19 07:41:46manishearthsetrecipients: + manishearth
2016-09-19 07:41:45manishearthsetmessageid: <1474270906.0.0.604707439727.issue28203@psf.upfronthosting.co.za>
2016-09-19 07:41:45manishearthlinkissue28203 messages
2016-09-19 07:41:45manishearthcreate