01 / 06
The four tools side by side
Four things came out of this chapter, and not one of them changes the behaviour.
- PEP 8 … makes the writing uniform. Four spaces to indent, lowercase names with underscores, one space either side of an operator
- a docstring … a description in
"""..."""placed just below a function or class - a type hint … a note of what goes in and what comes back
- a dataclass … deletes the lines nobody was in doubt about from a class that only holds data
Why do any of it, when nothing changes? To take time off the reader. And that reader is usually you, three days later.