Re: vertical ordering of functions

2011-05-10 Thread Hans Georg Schaathun
On Tue, 3 May 2011 18:08:27 -0400, Jabba Laci 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. My advice would be

Re: vertical ordering of functions

2011-05-04 Thread John Roth
On May 3, 4:08 pm, Jabba Laci 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. > However, when I write a Python

Re: vertical ordering of functions

2011-05-03 Thread Grant Edwards
On 2011-05-03, Jabba Laci 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 ab

Re: vertical ordering of functions

2011-05-03 Thread John Bokma
Ben Finney writes: > Jabba Laci writes: > >> Is there a convention for this? Should main() be at the top and called >> function below? > > No, it's Python convention for both of those to be at the end of the > module. > > I follow the convention described by Guido van Rossum in > http://www.arti

Re: vertical ordering of functions

2011-05-03 Thread Roy Smith
In article , Jabba Laci 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. There may have been some logic to this when

Re: vertical ordering of functions

2011-05-03 Thread Robert Kern
On 5/3/11 5:46 PM, MRAB wrote: On 03/05/2011 23:31, Chris Angelico wrote: On Wed, May 4, 2011 at 8:08 AM, Jabba Laci 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

Re: vertical ordering of functions

2011-05-03 Thread Ben Finney
Jabba Laci writes: > Is there a convention for this? Should main() be at the top and called > function below? No, it's Python convention for both of those to be at the end of the module. I follow the convention described by Guido van Rossum in http://www.artima.com/weblogs/viewpost.jsp?thread=4

Re: vertical ordering of functions

2011-05-03 Thread MRAB
On 03/05/2011 23:31, Chris Angelico wrote: On Wed, May 4, 2011 at 8:08 AM, Jabba Laci 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

Re: vertical ordering of functions

2011-05-03 Thread Chris Angelico
On Wed, May 4, 2011 at 8:08 AM, Jabba Laci 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

vertical ordering of functions

2011-05-03 Thread Jabba Laci
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. However, when I write a Python script I do just the opposite. I start with the lin