proposed proposal: set.values()

Fredrik Lundh fredrik at
Fri Mar 31 08:54:27 CEST 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.


More information about the Python-list mailing list