#28249: Remove unnecessary dict.keys() calls
------------------------------------------------+------------------------
               Reporter:  Jon Dufresne          |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Uncategorized         |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 `iter(dict)` is equivalent to `iter(dict.keys())`. Can simply  act on the
 dictionary. Provides simpler, more concise syntax and avoids the extra
 function call in Django.

 Inspired by Lennart Regebro's PyCon 2017 presentation "Prehistoric
 Patterns in Python". Available at:
 https://www.youtube.com/watch?v=V5-JH23Vk0I

--
Ticket URL: <https://code.djangoproject.com/ticket/28249>
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/052.f9b4f422ab1288d3db3c9c93b32a38f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to