[Python-ideas] kwargs for return

David Mertz mertz at gnosis.cx
Sat Jan 26 13:43:44 EST 2019


On Sat, Jan 26, 2019, 1:21 PM Christopher Barker

> As I understand it, functions return either a single value, or a tuple of
> values -- there is nothing special about how assignment is happening when a
> function is called.
>

No. It's simpler than that! Functions return a single value, period.

That single value might happen to be a tuple or something else unpackable.
This makes it feel like we have multiple return values, but we never
actually do. The fact that "tuples are spelled by commas not by
parentheses" makes this distinction easy to ignore most of the time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190126/6bcebe0c/attachment.html>


More information about the Python-ideas mailing list