« Back to Index

[Python3 pass vs …]

View original Gist on GitHub

Python3 pass vs ….md

Summary

Examples

If you had a function you were still in the process of writing, you might choose to use ...

def foo():
	...

If you were handling an exception and didn’t want to do anything with it:

deadline = time.time() + 10
deadline_passed = time.time() < deadline

while not deadline_passed:
    try:
        a_mock_object.assert_called()
        return
    except AssertionError:
        pass