Opened 9 years ago

Closed 9 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: UI/UX:


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 9 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 Changed 9 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design decision needed

Pretty negligible really, but maybe it should be clarified.

comment:3 Changed 9 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to 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".

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