Opened 17 years ago

Closed 17 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)

in reply to:  description comment:1 by anonymous, 17 years ago

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

comment:2 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed

Pretty negligible really, but maybe it should be clarified.

comment:3 by Malcolm Tredinnick, 17 years ago

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