#8846: Remove comment recommending tuples in settings docs
---------------------------------------------------+------------------------
 Reporter:  Daniel Pope <[EMAIL PROTECTED]>  |       Owner:  nobody    
   Status:  new                                    |   Milestone:            
Component:  Documentation                          |     Version:  SVN       
 Keywords:                                         |       Stage:  Unreviewed
Has_patch:  0                                      |  
---------------------------------------------------+------------------------
 In the documentation for
 [http://docs.djangoproject.com/en/dev/topics/settings/#creating-your-own-
 settings Creating your own settings] there's a recommendation which reads
 "For settings that are sequences, use tuples instead of lists. This is
 purely for performance."

 This is bunk. Profiling shows that tuples run no faster than lists for
 most operations (certainly looping, which we are likely to do most often).
 On the other hand, list-literal syntax has the advantage that it doesn't
 collapse to a single value when you have a single item and omit the
 trailing comma, like tuple syntax. Using list syntax is no slower, more
 legible and less error prone. An often-expressed view in the wider Python
 community seems that tuples should not be considered as immutable lists.
 They are intended as fixed-length records - indeed the mathematical
 concept of a tuple is quite distinct from that of a sequence.

 I suggest this (factually inaccurate) comment be removed, and in fact we
 should look at migrating all of the settings documentation to lists for
 legibility.

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