On 2013-10-28, Nobody <nob...@nowhere.com> wrote: > On Mon, 28 Oct 2013 09:50:19 +0000, Wolfgang Maier wrote: >> So my question is: is there an agreed-upon generally best way >> of dealing with this? > > Yes. Just leave the test inside the loop. > > If you're sufficiently concerned about performance that you're > willing to trade clarity for it, you shouldn't be using Python > in the first place.
When you detect a code small, as Wolfgang did, e.g., "I'm repeating the same exact test condition in several places," you should not simply ignore it, even in Python. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list