|
|
|
|
|
by dcferreira
1120 days ago
|
|
Cool post, I've also been using more and more type hints and it really makes writing python more enjoyable.
Although unfortunately it's still quite common for libraries to not have type stubs. On the section of construction functions, I've always used/seen `@classmethod` instead of `@staticmethod`.
I just had a quick look at some big python libraries (pandas, transformers), and they do use class methods.
Is there any particular reason you'd want to use static methods instead? |
|