Paul Rubin wrote:
> "Terry Reedy" <[EMAIL PROTECTED]> writes:
>> 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.
You could just do the fol
"Terry Reedy" <[EMAIL PROTECTED]> writes:
> 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.
> 2. It copies the wrong aspect of dict. A set is l
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> > 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.
Good poin
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 matchin
"Terry Reedy" <[EMAIL PROTECTED]> writes:
> 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.
> 2. It copies the wrong aspect of dict. A set is lik
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message
news:[EMAIL PROTECTED]
> I'm thinking of proposing that a values method be added to set
> objects, analogously with dicts. If x is a set, x.values() would be
> the same as list(x). This feels logical, and it would allow unified
> tr
I'm thinking of proposing that a values method be added to set
objects, analogously with dicts. If x is a set, x.values() would be
the same as list(x). This feels logical, and it would allow unified
treatment of dicts and sets in some contexts. Any objections?
--
http://mail.python.org/mailman/