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
Incorrectly pluralized abstract class error message #78512
Comments
>>> class abstract(abc.ABC):
... @abc.abstractmethod
... def meth():
... pass
...
>>> x()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Can't instantiate abstract class x with abstract methods meth Error should be "Can't instantiate abstract class abstract with abstract method meth" in the singular, because there is only one abstract method. |
I'm not sure the effort and code is justified for a trivial fix to an error message. Is this causing some actual problem? |
No, this isn't causing me an actual problem, however the related bpo-34127 was accepted, and this one should be no harder to fix. |
Actually, this one is probably easier to fix. In my opinion, bpo-34127 is more important to fix, since it's seen much more often than the message about abstract base classes. I wouldn't necessarily object to fixing this one, I just personally think it's not worth the hassle. |
Adding 3.9 to this bug. I've reviewed the PR and it looks good to me. |
Thank you for your contribution |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: