[Py] [Ideas] Small suggestion regarding type errors and subscription

2024-10-14 Thread James Webber via Discussions on Python.org
That makes much more sense. I was sure I had seen it before 3.13, but it must have been in a notebook or somewhere else where it displayed properly. I don't use the base REPL very often. --- [Visit Topic](https://discuss.python.org/t/small-suggestion-regarding-type-errors-and-subscription

[Py] [Ideas] Small suggestion regarding type errors and subscription

2024-10-14 Thread James Webber via Discussions on Python.org
Do you mean like this? ``` $ python -c 'print({"profile":None}["profile"]["name"])' Traceback (most recent call last): File "", line 1, in print({"profile":None}["profile"]["name"]) ~~~ TypeError: 'NoneType' object is not subscriptable ``` This i