[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, it is. Thank you Karthikeyan!

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Non-informative error message in index() and remove() functions

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> And seems that this issue is a duplicate of an old issue with a long 
> discussion and an unfinished patch, but currently I cannot find that issue.

possibly duplicate of issue13349 which was rejected ?

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thus is definitely is not related to Argument Clinic.

And seems that this issue is a duplicate of an old issue with a long discussion 
and an unfinished patch, but currently I cannot find that issue.

--
components:  -Argument Clinic
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread SilentGhost


SilentGhost  added the comment:

This seems to be related to argument clinic work (issue 20186 and issue 20185).

--
components: +Argument Clinic
nosy: +SilentGhost, larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread SilentGhost


Change by SilentGhost :


--
components: +Interpreter Core -Tests
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread Hardik


New submission from Hardik :

I am curious why ValueErrors are different in List and Tuple when I try to get 
an index.  ValueError of a list returns in well format with actual argument 
"ValueError: 'ITEM' is not in list", whereas tuple returns something like this 
"ValueError: tuple.index(x): x not in tuple". 
I think List and Tuple both are calling same index() method then why it is 
raising different ValueErrors? 
>>> jframe_li
['Angular', 'React', 'Vue.js', 'Ember.js', 'Mereor', 'Node.js', 'Backbone.js']
>>> jframe_tu
('Angular', 'React', 'Vue.js', 'Ember.js', 'Mereor', 'Node.js', 'Backbone.js')
>>> jframe_li.index('React')
1
>>> jframe_tu.index('React')
1
>>> jframe_li.index('react')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: 'react' is not in list

>>> jframe_tu.index('react')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: tuple.index(x): x not in tuple

--
components: Tests
messages: 338906
nosy: HardikPatel
priority: normal
severity: normal
status: open
title: Different ValueError for the same operation in List and Tuple
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com