aerial view of zigzag road on mountain
Photo by Johannes Hofmann on Unsplash

If you are implementing a new class, but do not have time now, or simply want to postpone it for later, then you can use the pass statement.

I have seen it being used all over the place, and I think it is a good idea to use it when you are writing a class that does not have any bodies of any methods, or when you are implementing a class that is not yet complete.

You can use it to do test-driven development when you initially write a failing test that calls a method that is not implemented yet, which you can then implement and fix the failing test.

Another scenario when I saw it being used was in coding assignments that are part of homework.

Continue reading