I just wanted to sum up this thread of discussion. Proposal: A function in abc to provide a default abstract method implementation. foo = make_abstractmethod('foo', ['self']) is the same as @abc.abstractmethod def foo(self): pass Details: Default behavior, if implemented, should probably be empty/pass/return None. How to handle docstrings? Either attribute docstring (a separate discussion) or a parameter in the function call. Pros: Save a lot of lines defining interface-like ABCs, especially in small scripts without docstrings (bad practice, but I do it often =)) Cons: Do we need it?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4