[Python-ideas] get() method for list and tuples
Steven D'Aprano
steve at pearwood.info
Tue Feb 28 19:02:54 EST 2017
On Tue, Feb 28, 2017 at 07:10:15PM +0100, Sven R. Kunze wrote:
> 1. advantage: it looks like dict access -> allows duck typing (oh how
> often I'd missed that)
Dicts and lists don't duck-type because they are very different things.
We know what ["item"]*10 does. What would {"key": "value"}*10 do?
What would list.values() iterate over?
--
Steve
More information about the Python-ideas
mailing list