Opened 18 years ago
Closed 18 years ago
#3886 closed (wontfix)
DB_API, Meta options -> unique_together: List of lists or tuple of tuples?
Reported by: | anonymous | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Should the unique_together variable in a models Meta class be a "list of lists", like stated in the text, or a tuple of tuples, like shown in the example?
Change History (3)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
Pretty negligible really, but maybe it should be clarified.
comment:3 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
It's common Python practice for lists and tuples to be interchangeable unless otherwise mentioned. In the docs we tend to use one word or the other because "sequence" (the generic term) isn't a Python type and beginners don't realise that we mean list or tuple. It's not worth changing every occurrence of list or tuple to the longer "list or tuple".
edit: seems both types are working, so this should just be pointed out in the docu