DEV Community

Discussion on: Dead Simple Python: Classes

Collapse
 
akashsharma02 profile image
Akash Sharma • Edited

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

Collapse
 
codemouse92 profile image
Jason C. McDonald

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.

Collapse
 
akashsharma02 profile image
Akash Sharma

Ah I see! I really appreciate this series. It is very well written and enjoyable to read!

By the way, what is that reason?

Thread Thread
 
codemouse92 profile image
Jason C. McDonald

Namespacing.