Opened 12 years ago

Closed 12 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: master
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


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 in reply to:  description Changed 12 years ago by anonymous

edit: seems both types are working, so this should just be pointed out in the docu

comment:2 Changed 12 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

Pretty negligible really, but maybe it should be clarified.

comment:3 Changed 12 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

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".

Note: See TracTickets for help on using tickets.
Back to Top