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 kedar mhaswade
Recipients kedar mhaswade
Date 2015-08-08.14:55:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1439045720.08.0.367506604724.issue24830@psf.upfronthosting.co.za>
In-reply-to
Content
I am a n00b Python programmer. So far, I am loving Python! Thank you.

Apologies if this has been already reported. A rudimentary search did not fetch anything and hence I am filing this as an enhancement request. If it has been already reported, please point me in the right direction so that I can stand corrected.

I believe following experience could be improved:
-----------------------------
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> l = []
>>> l[2]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range
-----------------------------

if the message would indicate the index in error. This, I believe, is a low-hanging fruit that has several debugging benefits.

I hate to compare things, but I do want to note that Java does better in this regard:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
	at Foo.main(Foo.java:5)
History
Date User Action Args
2015-08-08 14:55:20kedar mhaswadesetrecipients: + kedar mhaswade
2015-08-08 14:55:20kedar mhaswadesetmessageid: <1439045720.08.0.367506604724.issue24830@psf.upfronthosting.co.za>
2015-08-08 14:55:20kedar mhaswadelinkissue24830 messages
2015-08-08 14:55:18kedar mhaswadecreate