Question: What do `@classmethod` and `@staticmethod` mean in Python, and how are they different? *When* should I use them, *why* should I use them, and *how* should I use them?

As far as I understand, `@classmethod` tells a class that it's a method which should be inherited into subclasses, or... something. However, what's the point of that? Why not just define the class method without adding `@classmethod` or `@staticmethod` or any `@` definitions?

Answer: 
When to use each
================

`@staticmethod` function is nothing more than a function defined inside a class. It is callable without instantiating the class first. It’s definition is immutable via inheritance.

* Python does not have to instantiate a **bound-method** for object.
* It eases the readability of the code: seeing **@staticmethod**, we know that the method does not depend on the state of object itself;

`@classmethod` function also callable without instantiating the class, but its definition follows Sub class, not Parent class, via inheritance, can be overridden by subclass. That’s because the first argument for `@classmethod` function must always be `cls (class)`.

* **Factory methods**, that are used to create an instance for a class using for example some sort of pre-processing.
* **Static methods calling static methods**: if you split a static methods in several static methods, you shouldn't hard-code the class name but use class methods

[here](http://julien.danjou.info/blog/2013/guide-python-static-class-abstract-methods) is good link to this topic.
***A little compilation***

**@staticmethod**
A way to write a method inside a class without reference to the object it is being called on. So no need to pass implicit argument like self or cls.
It is written exactly the same how written outside the class, but it is not of no use in python because if you need to encapsulate a method inside a class since this method needs to be the part of that class @staticmethod is comes handy in that case.

**@classmethod**
It is important when you want to write a factory method and by this custom attribute(s) can be attached in a class. This attribute(s) can be overridden in the inherited class.

A comparison between these two methods can be as below

[![Table](https://i.stack.imgur.com/LUyfq.png)](https://i.stack.imgur.com/LUyfq.png)