On Mon, Oct 8, 2012 at 8:17 AM, Victor Stinner <victor.stin...@gmail.com> wrote: > Another problem with huge files is to handle "dependencies" with > static functions. If the function A calls the function B which calls > the function C, you have to order A, B and C "correctly" if these > functions are private and not declared at the top of the file. > > If functions are grouped correctly, you just lhave to add the function > to the right file, or reorder the files.
This isn't a fundamental problem, since you can always declare a private function if it's mutually recursive with another private function. But - forgive me if this is false in CPython - this isn't usually that common. Also, ordering the functions in (at least an approximation of) Define Before Use makes it easy to locate the one you're calling, even in a non-smart editor: just go to the top of the file and search for the function's name; the first hit will be the definition. It's not usually difficult to sort functions appropriately, and can pay dividends in readability. ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com