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


Groups > comp.lang.python > #4584

Re: vertical ordering of functions

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.036
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'wed,': 0.04; 'whichever': 0.07; 'term,': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'defined': 0.15; 'bottom.': 0.16; 'definition.': 0.16; 'ties': 0.16; 'classes,': 0.19; 'functions,': 0.19; 'header:In-Reply-To:1': 0.22; 'says': 0.25; 'define': 0.26; "i'm": 0.26; 'chris': 0.27; 'function': 0.27; 'message-id:@mail.gmail.com': 0.28; 'hi,': 0.29; 'does': 0.31; 'called': 0.32; 'to:addr:python-list': 0.32; 'creates': 0.33; 'think': 0.36; 'should': 0.37; 'received:209.85': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'would': 0.40; "it's": 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'below': 0.63; 'entitled': 0.64; 'below.': 0.64; 'flow': 0.69; 'best!': 0.84; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=sj/MCUTRKJ59BTccHv07/luFYOeti2PcFdQ7XKCZ1iE=; b=uk/i9Ub64b7hSpF8pkXYPykpDG/zbqFMD7ZBs7uRgKzWRGpke4Hhus+oDyntg6Vu14 z4z6HJtWiv7QNxJkGA5zBdMse1TXWP/wKPniIiTqMBEc+4RJCU8DOGVJRPY/u5ZYzfae rxIC68YTPrjiEgadbjoguDfA39IXRou0wzVG0=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ZrWJZ7tL6M8l2NMvU8Mk1N0PAC0UQRtFhxOL3s4cBg1UkKStThp1h+F9f7Ih7HXdcO THpsYTRL+RAYSw7MOf6yO+wSLSv+ZLzeKeU32vNYGsmAbPBYaYrU0QCiW/VALHojK8Xu VndmV5Mt6Wtoq4RQjyUCe51WYLWCycQY02OHo=
MIME-Version 1.0
In-Reply-To <BANLkTinuFqsVEroQH6Tm=Q1r8UGxZFBGpQ@mail.gmail.com>
References <BANLkTinuFqsVEroQH6Tm=Q1r8UGxZFBGpQ@mail.gmail.com>
Date Wed, 4 May 2011 08:31:18 +1000
Subject Re: vertical ordering of functions
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1130.1304461882.9059.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 82.94.164.166
X-Trace 1304461882 news.xs4all.nl 65870 [::ffff:82.94.164.166]:37447
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:4584

Show key headers only | 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