Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Is this PEP-able? fwhile

Reply
Thread Tools

Re: Is this PEP-able? fwhile

 
 
Ian Kelly
Guest
Posts: n/a
 
      06-24-2013
On Mon, Jun 24, 2013 at 4:41 PM, Fábio Santos <(E-Mail Removed)> wrote:
>
> On 24 Jun 2013 22:29, "Ian Kelly" <(E-Mail Removed)> wrote:
>>
>> On Mon, Jun 24, 2013 at 2:34 PM, Fábio Santos <(E-Mail Removed)>
>> wrote:
>> > This can probably be best achieved by adding to the existing for loop,
>> > so maybe taking advantage of the existing for...if syntax and adding
>> > for...while would be a better idea?

>>
>> The for...if syntax only exists for comprehensions and generators. If
>> we're going to add for...while for loops, then we might as well go
>> ahead and add for...if loops there as well.
>>
>> That said, I do like this syntax better than "fwhile".

>
> Good point. Still, I don't see why for..if doesn't exist in for loops
> anyway. It may be lack of foresight, but I don't understand why at all.


Because it adds more syntax to learn when learning the language, it
introduces more maintenance overhead, and it offers no clear benefit
over simply nesting an if inside a for.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this PEP-able? fwhile jimjhb@aol.com Python 2 06-26-2013 07:40 AM
Re: Is this PEP-able? fwhile Ian Kelly Python 7 06-25-2013 06:04 AM
Re: Is this PEP-able? fwhile Joshua Landau Python 0 06-24-2013 08:40 PM
Re: Is this PEP-able? fwhile Fábio Santos Python 0 06-24-2013 08:34 PM
Re: Is this PEP-able? fwhile Ian Kelly Python 0 06-24-2013 08:19 PM



Advertisments