---
title: "What do these mean of: @classmethod and @staticmethod"  
description: "What do these mean of: @classmethod and @staticmethod"  
author: "Prakash nidhi Verma"  
published: 2018-07-19  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/23473/what-do-these-mean-of-classmethod-and-staticmethod  
category: "python"  
tags: ["python-3.4", "python"]  
reading_time: 1 minute  

---

# What do these mean of: @classmethod and @staticmethod

These are decorators. A decorator is a special kind of function that either takes a function and returns a function, or takes a class and returns a class. The @ symbol is just syntactic sugar that easy in read.

```
@my_decorator def my_func(stuff):
    do_things
```

```
def my_func(stuff):
    do_things

my_func = my_decorator(my_func)
```

## Answers

### Answer by Prakash nidhi Verma

These are decorators. A decorator is a special kind of function that either takes a function and returns a function, or takes a class and returns a class. The @ symbol is just syntactic sugar that easy in read.

```
@my_decorator def my_func(stuff):
    do_things
```

```
def my_func(stuff):
    do_things

my_func = my_decorator(my_func)
```


---

Original Source: https://www.mindstick.com/interview/23473/what-do-these-mean-of-classmethod-and-staticmethod

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
