I'd like to add that you should mention that there's pretty much never a good reason to use staticmethod as opposed to a global method in the module.
staticmethod
Usually, when we write a module, we can simply write a method outside the class, to get the same behaviour as a staticmethod
I try to avoid such statements, especially in this article series. If it exists, it exists for some reason. ;)
That said, I plan to discuss the ins and outs of this in more depth in the book.
Ah I see! I really appreciate this series. It is very well written and enjoyable to read!
By the way, what is that reason?
Namespacing.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd like to add that you should mention that there's pretty much never a good reason to use
staticmethod
as opposed to a global method in the module.Usually, when we write a module, we can simply write a method outside the class, to get the same behaviour as a
staticmethod
I try to avoid such statements, especially in this article series. If it exists, it exists for some reason. ;)
That said, I plan to discuss the ins and outs of this in more depth in the book.
Ah I see! I really appreciate this series. It is very well written and enjoyable to read!
By the way, what is that reason?
Namespacing.