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.
Class method can modify the class state,it bound to the class and it contain cls as parameter.

Static method can not modify the class state,it bound to the class and it does't know class or instance

```
class empDetails:
    def __init__(self,name,sal):
        self.name=name
        self.sal=sal
    @classmethod
    def increment(cls,name,none):
        return cls('yarramsetti',6000 + 500)
    @staticmethod
    def salChecking(sal):
        return sal > 6000

emp1=empDetails('durga prasad',6000)
emp2=empDetails.increment('yarramsetti',100)
# output is 'durga prasad'
print emp1.name
# output put is 6000
print emp1.sal
# output is 6500,because it change the sal variable
print emp2.sal
# output is 'yarramsetti' it change the state of name variable
print emp2.name
# output is True, because ,it change the state of sal variable
print empDetails.salChecking(6500)

```