Re: Feedback on Until recipe

2007-04-27 Thread Antoon Pardon
On 2007-04-26, MRAB <[EMAIL PROTECTED]> wrote: > At http://mail.python.org/pipermail/python-dev/2006-February/060718.html > Raymond Hettinger suggested removing the final colon after the 'while' > if there's no statement after it, which I agree with, although I would > prefer 'repeat' instead of '

Re: Feedback on Until recipe

2007-04-26 Thread MRAB
On Apr 26, 11:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote: > > > Occasionally someone posts to this group complaining about the lack of > > "repeat ... until" in python. I too have occasionally wished for such > > a construct, and after

Re: Feedback on Until recipe

2007-04-26 Thread Antoon Pardon
On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote: > Occasionally someone posts to this group complaining about the lack of > "repeat ... until" in python. I too have occasionally wished for such > a construct, and after some thinking, I came up with the class below. > I'm hoping to get some

Re: Feedback on Until recipe

2007-04-25 Thread Carsten Haese
On Wed, 2007-04-25 at 19:11 -0700, Paul McGuire wrote: > I moved the state into the Until instance vs. the Until class, so that > it now supports nesting. But the calling syntax is even uglier - but > necessary to avoid creating a new Until instance each time around. > That is "while Until(blah):"

Re: Feedback on Until recipe

2007-04-25 Thread Paul McGuire
I moved the state into the Until instance vs. the Until class, so that it now supports nesting. But the calling syntax is even uglier - but necessary to avoid creating a new Until instance each time around. That is "while Until(blah):" evaluates and constructs a new Until instance each time around

Re: Feedback on Until recipe

2007-04-25 Thread Paul McGuire
On Apr 24, 11:08 am, Thomas Nelson <[EMAIL PROTECTED]> wrote: > Occasionally someone posts to this group complaining about the lack of > "repeat ... until" in python. I too have occasionally wished for such > a construct, and after some thinking, I came up with the class below. > I'm hoping to get

Re: Feedback on Until recipe

2007-04-24 Thread Steve Holden
Thomas Nelson wrote: > Occasionally someone posts to this group complaining about the lack of > "repeat ... until" in python. I too have occasionally wished for such > a construct, and after some thinking, I came up with the class below. > I'm hoping to get some feedback here, and if people beside

feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally people post complaining about the lack of a "repeat...until" structure in python. I thought about it and came up with this recipe that I like. The only ugly thing is having to use lambdas, otherwise it's very terse and readable. Tell me what you think, and if anyone besides me think

Feedback on Until recipe

2007-04-24 Thread Thomas Nelson
Occasionally someone posts to this group complaining about the lack of "repeat ... until" in python. I too have occasionally wished for such a construct, and after some thinking, I came up with the class below. I'm hoping to get some feedback here, and if people besides me think they might use it