proposed proposal: set.values()

Fredrik Lundh fredrik at pythonware.com
Fri Mar 31 01:54:27 EST 2006


Paul Rubin wrote:

> > 1. It is pure duplication that *adds* keystrokes.
>
> Nobody says you shouldn't use list(s) if you know you're dealing with
> a set.  The idea of s.values() is so you can duck-type between dicts
> and sets.

if y is a dict, "x in y" looks for a matching key, not for a matching value.

</F>






More information about the Python-list mailing list