I recently had to debug someone else's Python code and trying to figure out what variables are was a massive headache, especially coming from C++.

I do not program that much in python, but I believe the general accepted wisdom in dynamic languages was explicit name and load of documentations (as comments and docstrings).

Absolutely the general accepted wisdom in line with best practices - that are often ignored

> explicit name and load of documentations (as comments and docstrings).

Which can be out of date are often missing. Might as well use type-hints that can be statically checked.

If the name of a function and its docstring is out of date, then what you have is a bad culture for coding. It’s up there with god classes in OOP.

In Python, every variable is either defined or imported in the file in which it's used, so you always know where to find it. (Assuming you don't do `from foo import *`, which is frowned upon.)

In C++, a variable might be defined in a header or in a parent class somewhere else, and there's no indication of where it came from.

How does this help when trying to determine the parameters a function takes? You have to either hope that the name is descriptive enough or that the function is well-documented. Failing that, you need to read the code to find out.

CMD-click shows you.

Even c++ feels clunky in terms of types to me. Though that's probably down to me preferring a more complete type system like haskell has