Why does Django use tuples for settings and not lists?

前端 未结 3 544

Quoting this answer:

Apart from tuples being immutable there is also a semantic distinction that should guide their usage. Tuples are heterogeneous data str
3条回答
  •  长发绾君心
    2021-01-04 01:43

    I think the part of reason is tuple is read-only which will more safe and more suitable for setting.

提交回复
热议问题