Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107532 > unrolled thread
| Started by | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| First post | 2016-04-23 20:19 -0700 |
| Last post | 2016-04-23 20:19 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How much sanity checking is required for function inputs? Christopher Reimer <christopher_reimer@icloud.com> - 2016-04-23 20:19 -0700
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-04-23 20:19 -0700 |
| Subject | Re: How much sanity checking is required for function inputs? |
| Message-ID | <mailman.25.1461467961.32212.python-list@python.org> |
On 4/23/2016 7:34 PM, Michael Torrie wrote > Procedural programming does not necessarily mean BASIC-style goto hell. > Not sure why you would think that. In fact that's not really what > procedural programming is about. I mentioned several messages back that I spent two years writing procedural scripts AND translating BASIC games into Python, which can be goto hell if the program has a drop-down structure that makes sense only from following the entry point of the goto statement (see link for example). http://www.atariarchives.org/basicgames/showpage.php?page=9 I try to follow the BASIC program structure as closely as possible, get it working in Python, and use pylint to make my code PEP8-compliant. Pylint frequently complains about exceeding a dozen if branches in the main function. I then create helper functions to reduce the if branches. Sometimes that makes the Python version either shorter or longer than the original BASIC program. Thank you, Chris R.
Back to top | Article view | comp.lang.python
csiph-web