0 votes
in Python Flask by
Why would you use the "pass" statement?

1 Answer

0 votes
by
Python has the syntactical requirement that code blocks cannot be empty. Empty code blocks are however useful in a variety of different contexts, for example if you are designing a new class with some methods that you don't want to implement:

class MyClass(object):

    def meth_a(self):

        pass
...