Question #945

In the code snippet below, an exception will be thrown because of the space between the function decorator and the function.
class MyClass(object):

    @staticmethod

    def my_function():
        pass

Even though having a space after a function decorator is not compliant, the code snippet will run without issues. (flake8rules.com/rules/E304.html)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵