Re: FOR template tag improvement

2011-03-29 Thread Vinicius Mendes
I think it's not that pythonic as it's just another syntax to do a thing that we are already able to do with the current syntax. -1. -- Vinicius Mendes Globo.com On Tue, Mar 29, 2011 at 9:19 PM, Alex Gaynor wrote: > > > On Tue, Mar 29, 2011 at 7:19 PM, Russell Keith-Magee < > russ...@keith-ma

Re: FOR template tag improvement

2011-03-29 Thread Alex Gaynor
On Tue, Mar 29, 2011 at 7:19 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Tue, Mar 29, 2011 at 10:32 PM, Mikoskay wrote: > > It's rather difficult to provide specific use case for something that is > a > > convenience-related proposal. :) > > The opposite should be true. If this

Re: FOR template tag improvement

2011-03-29 Thread Russell Keith-Magee
On Tue, Mar 29, 2011 at 10:32 PM, Mikoskay wrote: > It's rather difficult to provide specific use case for something that is a > convenience-related proposal. :) The opposite should be true. If this is a proposal that is so convenient, there must be many ways in which it could be used. To me, th

Fwd: FOR template tag improvement

2011-03-29 Thread Cal Leeming [Simplicity Media Ltd]
-1 I dislike the new proposed syntax. 2011/3/29 Mikoskay > There are reasons. > > 1. It's handy and quick to type. > > {% for x in lst %} > {% if x.is_something %} > {{ x }} > {% endif %} > {% endfor %} > > vs > > {% for x in lst if x.is_something %} > {{ x }} > {% endfor %

Re: FOR template tag improvement

2011-03-29 Thread Carlos Leite
Mikoskay, I understand Jacob. > It's rather difficult to provide specific use case for something that is a > convenience-related proposal. :) If its dificult to have a use case, may is not a good idea for a Open Source project trunk. And if its a "convenience-related proposal", its not a case t

Re: FOR template tag improvement

2011-03-29 Thread Mikoskay
It's rather difficult to provide specific use case for something that is a convenience-related proposal. :) Let's make an analogy - why do we have AND boolean operator in IF tag, though we could just write: {% if first_condition %} {% if second_condition %} {{ x }} {% endif %} {%

Re: FOR template tag improvement

2011-03-29 Thread Jacob Kaplan-Moss
Sorry, but without a specific use-case I'm just not convinced. Jacob -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to dj

Re: FOR template tag improvement

2011-03-29 Thread Mikoskay
There are reasons. 1. It's handy and quick to type. {% for x in lst %} {% if x.is_something %} {{ x }} {% endif %} {% endfor %} vs {% for x in lst if x.is_something %} {{ x }} {% endfor %} I really believe it is a common task. For me it is. 2. It's pythonic. It wouldn't be

Re: FOR template tag improvement

2011-03-29 Thread Jacob Kaplan-Moss
Hi Mikołaj -- On Tue, Mar 29, 2011 at 8:45 AM, Mikołaj S. wrote: > I've came up with an idea of improving default FOR template tag: > {% for ... in ... %} > By adding something similar to list comprehension syntax: > {% for ... in ... if ... %} Can you give us some context for this request? What

FOR template tag improvement

2011-03-29 Thread Mikołaj S .
Hi, I've came up with an idea of improving default FOR template tag: {% for ... in ... %} By adding something similar to list comprehension syntax: {% for ... in ... if ... %} Filtering through looping is so common task that I'm sure many people would find this syntax quite handy. I'll be ha