﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35750	Separate method for values_list(..., flat=True), deprecate that kwarg	ivan-klass		"The `flat=True` behavior changes the meaning and signature of the method completely.

It's an obvious example of the [https://martinfowler.com/bliki/FlagArgument.html ""flag argument""] antipattern (more [https://luzkan.github.io/smells/flag-argument python examples])

especially because both input and output types are changed by that flag. The flag dispatches between two different type signatures.

 - with `flat=False` the returning value is an **iterable of tuples**. **Input is a var args of names** corresponding to the size of the tuple. The flag value is **usually never provided as a keyword** assuming the default. 

 - with `flat=True` the **result is a flat iterable** with an element type of the requested field. Keyword **righthand side is usually `True` literal**, I can't imagine code where `flat=<variable>` in practice.

Given that, it seems like there should be separate methods:

- values_list(*names)

- flat_values_list(name)
"	Cleanup/optimization	closed	Database layer (models, ORM)	5.1	Normal	wontfix	values_list flat flag QuerySet ValuesQuerySet		Unreviewed	0	0	0	0	1	0
