#28001: Remove obsolete context popping in ForNode.render()
--------------------------------------+------------------------------------
     Reporter:  Baptiste Mispelon     |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Template system       |                  Version:  1.10
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by kapil garg):

 I think the comment needs to be changed but the code should remain there
 because if there are multiple variables and we are pushing them onto the
 context then we should pop them off because they are not of any use in
 next iteration. If we don't pop those variables, the context will keep on
 growing without any significance.
 Its not that this is obsolete line of code, it works now as an
 optimization to save stack memory.
 The comment should be changed to

 {{{
 """
 # The loop variables were pushed on to the context so pop them
 # off again. This is necessary to prevent context stack from growing
 # insignificantly.
 """
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28001#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.551ba559a6afe82de3adc1409ea3385b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to