You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to traditional abstract methods, ABC could just be there to declare a class variable that should be set for concrete classes in a less verbose way than using annotations and properties:
classAbstract(ABC):
attr: ClassVar[str]
This is checked by mypy and will also raise an AttributeError if trying to access attr on a concrete class that doesn't set it. See https://peps.python.org/pep-0526/
In addition to traditional abstract methods,
ABC
could just be there to declare a class variable that should be set for concrete classes in a less verbose way than using annotations and properties:This is checked by mypy and will also raise an
AttributeError
if trying to accessattr
on a concrete class that doesn't set it. See https://peps.python.org/pep-0526/Originally posted by @alk-gpajot in #278 (comment)
The text was updated successfully, but these errors were encountered: