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


Groups > comp.lang.python > #4594

Re: vertical ordering of functions

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: vertical ordering of functions
Date 2011-05-04 01:09 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <ipq90j$bud$1@reader1.panix.com> (permalink)
References <mailman.1127.1304460530.9059.python-list@python.org>

Show all headers | View raw


On 2011-05-03, Jabba Laci <jabba.laci@gmail.com> wrote:

> 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 generally expect the opposite: callees above, callers below, main at
the bottom.  However, that's mostly just a habit left over from C
programming where such an ordering avoids having to litter the file
with forward declarations for functions.

-- 
Grant

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


Thread

vertical ordering of functions Jabba Laci <jabba.laci@gmail.com> - 2011-05-03 18:08 -0400
  Re: vertical ordering of functions Ben Finney <ben+python@benfinney.id.au> - 2011-05-04 09:58 +1000
    Re: vertical ordering of functions John Bokma <john@castleamber.com> - 2011-05-03 19:44 -0500
  Re: vertical ordering of functions Roy Smith <roy@panix.com> - 2011-05-03 20:27 -0400
  Re: vertical ordering of functions Grant Edwards <invalid@invalid.invalid> - 2011-05-04 01:09 +0000
  Re: vertical ordering of functions John Roth <johnroth1@gmail.com> - 2011-05-04 04:14 -0700
  Re: vertical ordering of functions Hans Georg Schaathun <hg@schaathun.net> - 2011-05-10 19:31 +0100

csiph-web