PYTHON

Python Classes And Object Orientated Design

Date Published:
Last Modified:

Since Python v3.3, you can use both the @staticmethod and @abstractmethod decorators on the same class function (and the @abstractstaticmethod decorator has been depreciated).

import abc

class MyClass:

    @staticmethod
    @abstractmethod
    def my_func():
        pass

Like this page? Upvote with shurikens!

Related Content:

Tags:

comments powered by Disqus