Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError for undefined abstractmethod does not highlight the undefined method name #98284

Closed
kaushikcfd opened this issue Oct 15, 2022 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@kaushikcfd
Copy link
Contributor

kaushikcfd commented Oct 15, 2022

Feature or enhancement

Currently, on instantiating a type with an undefined abstract property named "name" we get the following error message:

TypeError: Can't instantiate abstract class IndexNode with abstract method name

The name could be confused as a part of the sentence itself. It must be highlighted, most likely by surrounding the method names with single-quotes

Pitch

Could be implemented via a nondisruptive patch that would edit just the error message in Objects/typeobject.c

Previous discussion

A reference implementation was discussed at #97971.

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Nov 5, 2022

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants