#25455: optimization dictfetchall in documentation
--------------------------------------+--------------------------
     Reporter:  aklim007              |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:
     Severity:  Normal                |   Keywords:  dictfetchall
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------------
 https://docs.djangoproject.com/en/1.8/topics/db/sql/
 {{{
 def dictfetchall(cursor):
     "Return all rows from a cursor as a dict"
     columns = [col[0] for col in cursor.description]
     return [
         dict(zip(columns, row))
         for row in cursor.fetchall()
     ]
 }}}

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

Reply via email to