#32973: Pass generator expression to str.join() instead of list / tuple 
throughout
code base
------------------------------------------------+------------------------
               Reporter:  Chris Jerdonek        |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Uncategorized         |        Version:  dev
               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                     |
------------------------------------------------+------------------------
 In many places throughout Django's code base, a list or tuple is passed to
 `str.join()` when a generator expression would suffice. For example,
 instead of `', '.join([self.quote_name(field.column) for field in
 fields])` one can do `', '.join(self.quote_name(field.column) for field in
 fields)`. This eliminates an unneeded list creation. Many (but not all)
 examples can be found by searching the code base for `.join([`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32973>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.5354ea59e1d77059ef19041bdfc05743%40djangoproject.com.

Reply via email to