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.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to