[Tutor] Making big 'uns into little 'uns

Jerry Hill malaclypse2 at gmail.com
Thu Sep 6 16:35:24 CEST 2012


On Thu, Sep 6, 2012 at 10:15 AM, Ray Jones <crawlzone at gmail.com> wrote:
> Well, of all the.....   a REAL programming language..... I mean, even
> Bash.... ;;))
>
> Anyway, it was a shot. Thanks.

There's almost certainly a way to accomplish your goal of simplifying
your giant nested if statements.  It just doesn't involve pointers.
Perhaps if you mocked up a representative example for us to look at
and play with, someone could come up with a suggestion.

For instance, if your set of if statements is emulating what would be
done with a case statement in other languages, dictionary based
dispatch may be a cleaner way to do the same thing in python.

-- 
Jerry


More information about the Tutor mailing list