Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4584

Re: vertical ordering of functions

References <BANLkTinuFqsVEroQH6Tm=Q1r8UGxZFBGpQ@mail.gmail.com>
Date 2011-05-04 08:31 +1000
Subject Re: vertical ordering of functions
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1130.1304461882.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, May 4, 2011 at 8:08 AM, Jabba Laci <jabba.laci@gmail.com> wrote:
> Hi,
>
> I'm just reading Robert M. Martin's book entitled "Clean Code". In Ch.
> 5 he says that a function that is called should be below a function
> that does the calling. This creates a nice flow down from top to
> bottom.

I prefer to define my terms before I use them. Classes, functions, etc
get defined at the top and called down below. It's a stylistic thing,
but it ties in with what you would do in a debate or scholarly
document; and if you're skimming such a document and you don't
understand a term, you know to scan upwards for its definition.

It's just a stylistic thing, you can do it whichever way you think best!

Chris Angelico

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: vertical ordering of functions Chris Angelico <rosuav@gmail.com> - 2011-05-04 08:31 +1000

csiph-web