About Nested Function Calls vs. Multiple Statements

Instead of nested function calls, assign the results of functions to variables. It will be easier to analyze the traceback if errors happen.

For example:

1
result = f3(f2(f1()))

should rather become:

1
2
3
result = f1()
result = f2(result)
result = f3(result)

Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2 Python 3