#8846: Remove comment recommending tuples in settings docs
------------------------------------------------------------+---------------
          Reporter:  Daniel Pope <[EMAIL PROTECTED]>  |         Owner:  nobody
            Status:  new                                    |     Milestone:    
    
         Component:  Documentation                          |       Version:  
SVN   
        Resolution:                                         |      Keywords:    
    
             Stage:  Unreviewed                             |     Has_patch:  0 
    
        Needs_docs:  0                                      |   Needs_tests:  0 
    
Needs_better_patch:  0                                      |  
------------------------------------------------------------+---------------
Comment (by Daniel Pope <[EMAIL PROTECTED]>):

 tuples behave like immutable lists, but tuple-literal syntax is worse for
 describing lists (understandable if the intention was not for them to be
 used as lists).

 tuples are negligibly faster than lists:

 {{{
 mauve-desktop:~/dev/Django-1.0$ python -m timeit -s "a = range(1000)" "for
 i in a: pass"
 10000 loops, best of 3: 50.4 usec per loop
 mauve-desktop:~/dev/Django-1.0$ python -m timeit -s "a =
 tuple(range(1000))" "for i in a: pass"
 10000 loops, best of 3: 49.3 usec per loop
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8846#comment:2>
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