I'm not talking about modifications inside the settings.py but in other 
place. With lists, unexperienced devs might do things like: from 
django.conf import settings; settings.TEMPLATE_DIRS[3] = '/my_tpls'; and 
expect to work out good. (This doesn't violate the docs, since technicaly 
settings.TEMPLATE_DIRS is still the same list, means the settings variable 
itself hasn't been changed.) This is realy just a question of logic: lists 
are mutable - settings are immutable; see the conflict?

Am Montag, 19. Januar 2015 14:20:51 UTC+1 schrieb Florian Apolloner:
>
>
>
> On Monday, January 19, 2015 at 12:35:10 PM UTC+1, Andreas Kahnert wrote:
>>
>> I'm strongly against lists. Lists are mutable objects, their components 
>> can be changed in place. The settings are initialized at server start and 
>> after that changes on them arn't reflected. Therefore all settings should 
>> be tuples from my point of view. Using a custom list/tuple class for "easy" 
>> notation within the settings.py might be an option, but after server 
>> startup all of those should be immutable. So for the sake of logic, take 
>> tuples, please.
>>
>
> As long as  something like settings.MY_SETTING=(1,); 
> settings.MY_SETTING+=(1,2,3) works, that argument is kinda moot imo.
>
> Cheers,
> Florian
>

-- 
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/5b974048-0c9f-4ae2-8ff2-8db1fbd736f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to