Improving your Python Code Through Documentation, Type Hinting and Proper Variable Names
Do you often look back at some code you wrote 6 months ago and scratch your head and wonder what this mess is? Or have you been passed a project that has been worked on by someone else and struggle to know where to start? If so you are not alone.
There are a number of ways in Python to help you understand the inner workings of your code, so that when you come back to it, it should be much easier to carry on where you left off.
As an example, we may end up with code that looks a lot like the one in the image below. It is not the worst, however, there are a few things we need to expand on such as:
What does f and d stand for in the load_las_file function?
Why are we checking the result in the clay function?
What types are these functions looking for? Floats? DataFrames?

