[issue28203] complex() gives wrong error when the second argument has an invalid type

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1112 ___ Python tracker ___ ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-25 Thread Soumya Sharma
Soumya Sharma added the comment: Thanks for the merge! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed; thanks. I made a couple of changes: - Use "argument" rather than "arg", to be consistent with the original code (but admittedly not consistent with the rest of the module, where there doesn't seem to be any consistent choice between "arg" and

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92f4ce2d5ebb by Mark Dickinson in branch '3.5': Issue #28203: Fix incorrect type in error message from complex(1.0, {2:3}). Patch by Soumya Sharma. https://hg.python.org/cpython/rev/92f4ce2d5ebb New changeset a2d93e6bcbcf by Mark Dickinson in

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks. I'll apply this shortly (but probably not before the weekend). -- assignee: -> mark.dickinson ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. We can't fix this in 3.4 because it's in security-fix-only mode: https://docs.python.org/devguide/index.html#status-of-python-branches -- versions: -Python 3.4 ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Squashed the commits for better readability. Also, change required in Python 3.4 as well -- versions: +Python 3.4 Added file: http://bugs.python.org/file44755/Issue28203#4.patch ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Apologies. This is the correct file. -- Added file: http://bugs.python.org/file44754/Issue28203#3.patch ___ Python tracker

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Changes by Soumya Sharma : Removed file: http://bugs.python.org/file44753/Issue28203#2.patch ___ Python tracker ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Soumya Sharma
Soumya Sharma added the comment: Changed error message to: >>> complex({1:2},1) Traceback (most recent call last): File "", line 1, in TypeError: complex() first arg must be a string or a number, not 'dict' >>> complex(1j, {1: 2}) Traceback (most recent call last): File "", line 1, in

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: Thank you! I look forward to the new patch. -- ___ Python tracker ___ ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Soumya Sharma
Soumya Sharma added the comment: I've signed the contributor agreement form. I think it said that it'll take a few days to process? I've made the changes requested and am currently working on the tests. Will submit a new patch file containing all required changes soon. --

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: This should be fixed in Python 3.5, too. -- versions: +Python 3.5 ___ Python tracker ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: @manishearth: Nice catch! Thanks for the report. @soummyaah: Thanks for the patch. Please could you sign a contributor agreement[1], so that we can commit the patch? As Berker says, tests would be good to have, too. [1]

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Berker Peksag
Berker Peksag added the comment: Please upload your patch from a Mercurial clone: * https://docs.python.org/devguide/setup.html#checkout * https://docs.python.org/devguide/patch.html Currently, if you pass a string as a second argument, you get: >>> complex(1, "1") Traceback (most recent call

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread SilentGhost
Changes by SilentGhost : -- stage: -> patch review type: enhancement -> behavior versions: +Python 3.6 ___ Python tracker ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Soumya Sharma
Soumya Sharma added the comment: Contains changes made to Objects/complexobject.c Changed the error message returned when second argument of complex() is not number/string Originally: >complex(1j,{1:2}) Traceback (most recent call last): File "", line 1, in TypeError: complex()

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson, serhiy.storchaka ___ Python tracker ___

[issue28203] complex() gives wrong error when the second argument has an invalid type

2016-09-19 Thread Manish Goregaokar
New submission from Manish Goregaokar: 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 "", line 1, in TypeError: complex()