Python is readable

Chris Angelico rosuav at gmail.com
Thu Mar 22 15:21:12 EDT 2012


On Fri, Mar 23, 2012 at 1:29 AM, Nathan Rice
<nathan.alexander.rice at gmail.com> wrote:
> For example, your ability to reason about the behavior of the system
> you posited as a whole is limited.  Are there parts of the different
> modules that can execute concurrently?  Is the output of module1
> guaranteed to be acceptable as the input for module2?  Is part of
> module3 redundant (and thus avoidable) given some conditions in
> module1?  If you make a change in module2 what effect does that have
> on module3 and module4?  What if you need to go back and forth between
> module2 and module3 until some criterion is met before you transition
> to module4?  What if you sometimes want to run module2b instead of
> module2?

Pipes allow different modules to execute concurrently (except on DOS
and maybe Windows, haven't checked). Nothing in ANY language
"guarantees" acceptable input, but protocolling would do that for you.
If part of module3 is redundant, you don't call it. If you make a
change to one that affects others, then you fix the others, same as in
any other coding system (or non-coding system - if you upgrade your
hardware from an 8086 with 1MB of memory to a modern box with >4GB,
you'll have to rewrite your code to take advantage of it). The
(somewhat stupid) protocol I suggested allows you to go between 2 and
3 before going to 4. If you want module2b, you add it to the chain and
call on it.

Yep, Unix solved all your problems back in the 1970s.

ChrisA



More information about the Python-list mailing list