[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-20 Thread Soumya Sharma

Changes by Soumya Sharma <soummy...@gmail.com>:


Removed file: http://bugs.python.org/file44753/Issue28203#2.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
TypeError: complex() second arg must be a number, not 'dict'

Added tests to check the error raised.

--
Added file: http://bugs.python.org/file44753/Issue28203#2.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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() argument must be a string or a number, not 'complex'

After patch:
>complex(1j,{1:2})
Traceback (most recent call last):
 File "", line 1, in 
TypeError: complex() argument must be a string or a number, not 'dict'

--
hgrepos: +356
keywords: +patch
nosy: +soummyaah
Added file: http://bugs.python.org/file44745/Issue28203.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28203>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com