Terry J. Reedy <[email protected]> added the comment:
To avoid such questions, bug reports should contain exception messages and
usually at least some of the tracebacks.
>>> ''[0]
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
''[0]
IndexError: string index out of range
>>> x=None
>>> x[0]
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
x[0]
TypeError: 'NoneType' object is not subscriptable
IndexError should mean object was indexable.
Operations on None should give TypeError.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37491>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com