DEV Community


Random python fact of the day

mike239x profile image Mike Lezhnin ・1 min read

If you have an abstract base class with a static method, then the order of decorators should be like that:

def my_fancy_method():

If you switch them around you would get AttributeError: attribute '__isabstractmethod__' of 'staticmethod' objects is not writable. Now you know.

Discussion (0)

Editor guide