-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Add back typo detection to sub-attribute access #137967
Copy link
Copy link
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Bug report
Bug description:
I remember we used to have this when all the typo-detection machinery was in the C code but somehow that has not survived the transition to the new traceback machinery (or perhaps I am misremembering but I recall adding this originally when we added the first round). Either way this PR ensures that we have a nice error message when the typo is across attribute access:
Should print:
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs