Let's say I have a basic procedural program which is well structured into decomposed functions. For example, a main() function which calls functions a and b, which in turn each call functions c and d, and e and f. In pseudo-Python, this could be written bottom-up like this:def c():    # Do stuffdef d():    # Do stuffdef e():    # Do stuffdef f():    # Do stuffdef a():    c()    d()def b():    e()    f()if __name__ == __main__:    a()    b()However, it could also be written top-down like this:if __name__ == __main__:    a()    b()def a():    c()    d()def b():    e()    f()def c():    # Do stuffdef d():    # Do stuffdef e():    # Do stuffdef f():    # Do stuffIn general, in many languages, both of these would be valid, but is there a preferred coding style? I'm primarily thinking of readability/maintainability here, not efficiency of compilation or execution. Does it vary between languages? I'm thinking firstly of Python here, but there are many other languages this question could apply to here, so I'm happy to make it broader.Note: I am not thinking about the design of the program here (whether to think top-down or bottom-up first), I am specifically talking about the ordering of the source code.
Are there coding standards for whether procedural programs should have source code listed top-down or bottom-up?
python;coding style;source code