On Thu, Jan 22, 2015 at 12:32 PM, Andreas Kahnert <kahn...@cruise-systems.com> wrote: > Hi again, > Well, I can acknoledge that your reasons for list (beginner friendly) are as > good as my reasons for tuples (seems to be more logical choice for things > that are static). To say it in other words, my idea was simply: Use tuples > and the programmer will know that these arn't ment to be altered at runtime.
It is incorrect to say that the reason for lists is "beginner friendliness". It may well make things friendlier for beginners, but what it definitely helps with is for more advanced deployment configuration and for modifying settings from base or default settings files. Secondly, settings are *only* altered at run time. The module pointed at by DJANGO_SETTINGS_MODULE is imported, its code is run, and the settings object is produced. From this point on, yes, settings should not be modified, but that tells nothing about how they can be modified within the settings module during runtime but before being frozen in the settings object. >From my POV therefore, it is doubly wrong to have tuples and say this is because the values are meant to be immutable, because it does not reflect reality. For instance: from project.default_settings import * DEBUG=True INSTALLED_APPS.append('django_debug_toolbar') LOGGING['loggers']['homepage'] = { 'handlers': 'logfile', 'loglevel': DEBUG } All of this modification is perfectly valid, and this is why (imo) the default should be list instead of tuples. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFHbX1Ja3SOQyskMDbykmyguJRQvcnLtRatHn2qhOfYgWnqCVQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.