Function composition is by far the better solution, it is future proof and requires less memorization.
It's syntax is just somewhat ugly in Python. (Compared to, say, Haskell.)
> but then why even make a function if all it does is calling 2 functions in sequence
How else would you execute the functions? What initiates them?
I agree about clarity over everything else, but then why even make a function if all it does is calling 2 functions in sequence, and you can't name it on higher level of abstraction?
In this case wouldn't
be even clearer?True, functions allow you to change code in one place and affect many places (so they prevent "forgot to update one place" errors), but when function is named from its implementation instead of its purpose - it doesn't make much sense to change implementation anyway. The absolute worst thing is
So either I repeat myself by copy-pasting code, or I repeat myself by saying the same thing in implementation and in the name. It's the hardest problem in naming for me.