The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #945
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)
In the code snippet below, an exception will be thrown because of the space between the function decorator and the function.
— The Python Quiz (@thepythonquiz) August 18, 2021
class MyClass(object):
@staticmethod
def my_function():
pass
True
False
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅