On Sun, Sep 26, 2010 at 5:12 PM, Steven D'Aprano <st...@pearwood.info>wrote:

> On Mon, 27 Sep 2010 06:01:35 am Bill Allen wrote:
>
> Now your decision logic becomes simple, and obvious. It documents
> itself:
>
> if click_in_bottom_half1 and click_in_bottom_half2:
>    print "Both clicks in bottom half of screen"
> elif click_in_bottom_half1:
>    print "The first click was in the bottom half."
>    print "The second click was in the top half."
> elif click_in_bottom_half2:
>    print "The first click was in the top half."
>    print "The second click was in the bottom half."
> else:
>    print "Both clicks in top half of screen"
>
>
>
> --
> Steven D'Aprano
>

Steven,

Those are great suggestions and certainly do simplify matters quite a bit.
I had not realized the I was including such redundancies into my code.  I
have some other code I need to now go back through and see what
simplifications I can there also make.

Thanks!

--Bill
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to