#3523: Extend "for" tag to allow unpacking of lists
---------------------------+------------------------------------------------
   Reporter:  SmileyChris  |                Owner:  adrian                
     Status:  new          |            Component:  Template system       
    Version:  SVN          |           Resolution:                        
   Keywords:  for loop     |                Stage:  Design decision needed
  Has_patch:  1            |           Needs_docs:  0                     
Needs_tests:  0            |   Needs_better_patch:  0                     
---------------------------+------------------------------------------------
Comment (by SmileyChris):

 The bug fix was variable values from the previous loop could sneak on to
 the context if the current set of items was shorter than the loopvars list
 - see test `for-tag-unpack09`.
 
 The format checking has been tightened so that keyword arguments ''must''
 be comma separated -- either `{% for a,b in c %}` or `{% for a, b in c %}`
 will work.
 
 This patch now has '''no''' reliance on bug #3529 since it actually uses
 the push behaviour now. It was however brought up in discussion that this
 tag could be more efficient if `context.update` also accepted 2-length
 tuples, but that's outside of the scope of this ticket.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3523#comment:11>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to