What do these mean of: @classmethod and @staticmethod Prakash nidhi Verma 19-Jul-2018 1067 1 Answers Last updated:9/17/2020 4:05:58 AM
Prakash nidhi Verma 19-Jul-2018 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)
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.