beginner, idiomatic python
Neil Cerutti
horpner at yahoo.com
Mon Aug 27 14:44:18 EDT 2007
On 2007-08-27, Neil Cerutti <horpner at yahoo.com> wrote:
> This sort of suggests a direct solution:
>
> for i in xrange(self.parent.GetPageCount()):
> if i >= self.parent.GetPageCount():
> break
> # do stuff
>
> At least that way you're spared the manual manipulation of i.
On second thought, that last suggestion is flawed, as a growing
page count would be ignored. Please ignore.
--
Neil Cerutti
Whenever I see a homeless guy, I always run back and give him money, because I
think: Oh my God, what if that was Jesus? --Pamela Anderson
More information about the Python-list
mailing list