Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4580
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jabba.laci@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'main()': 0.05; '__name__': 0.07; 'python': 0.07; '"__main__":': 0.09; 'to:name:python mailing list': 0.09; 'bottom.': 0.16; 'decompose': 0.16; 'thanks,': 0.17; 'this?': 0.18; 'says': 0.25; 'script': 0.26; "i'm": 0.26; 'function': 0.27; 'message-id:@mail.gmail.com': 0.28; 'problem': 0.29; 'hi,': 0.29; 'convention': 0.29; 'does': 0.31; 'however,': 0.31; 'called': 0.32; 'to:addr:python-list': 0.32; 'creates': 0.33; 'lines': 0.34; 'there': 0.35; 'some': 0.37; 'should': 0.37; 'received:google.com': 0.38; 'to:addr:python.org': 0.39; 'add': 0.39; 'header:Received:5': 0.40; 'below': 0.63; 'entitled': 0.64; 'flow': 0.69; 'received:74.125.83': 0.69 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=171BnhJTGFUtu3NBeUBk486uD5og5KHFHCEBNweQ0mQ=; b=N+lQp7P3idUiENRHO+NUrj+89pe38ZMQxCL2V6z/GBPZTd0Q3e5UvzLGG2GPvfc1GX SFXtCNWUStZUUv/NKSkVfMvYNDvc9tGL+JapLHViNNvsYHViVgyogYNmU8ySa3lyoSQW Das1UB6sZfKOdACmXzPbWkx5CNf38hoI8y/fw= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=SFMveUgYv3TgzUo/H2SDo+l3ieF5Y/KN6PmwOPhrgIJCLKXraIABzrSZt2eqjsmLWe UHgH1KozjGWroq9Mb+a71V6A/8SBy/MnPQbjlWpz+TG4h2Lu9S6Sw221ah7YDp2oMR3G U7tOekS6MBPUma7H2LTeU3NijAb6M03QVftto= |
| MIME-Version | 1.0 |
| From | Jabba Laci <jabba.laci@gmail.com> |
| Date | Tue, 3 May 2011 18:08:27 -0400 |
| Subject | vertical ordering of functions |
| To | Python mailing list <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.1127.1304460530.9059.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1304460530 news.xs4all.nl 81481 [::ffff:82.94.164.166]:37453 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:4580 |
Show key headers only | View raw
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 lines
if __name__ == "__main__":
main()
Then I add main() above, which is a control function that contains
some function calls that decompose the problem into subproblems. Then
I add these functions above, etc.
Is there a convention for this? Should main() be at the top and called
function below?
Thanks,
Laszlo
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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