[Python-3000] Iterators for dict keys, values, and items == annoying :)
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Mar 31 03:53:14 CEST 2006
Ian Bicking wrote:
> Though if "Set([(1, None), (2, None)]) ==
> {1: None, 2: None}" is true, that's actually perfectly fine to me.
That would be rather too loose for my tastes. A mapping
can be *represented* as a set of tuples, but that's not
the same thing as it *being* a set of tuples.
> Generally speaking I've remained suspicious of adaptation.
I think to most people it seems like a solution
looking for a problem. In all the code I've ever
written, plain duck typing has been perfectly
adequate. I'm willing to concede that it might
have use in some specialised areas such as Zope,
but there doesn't seem to be any general demand
for it.
--
Greg
More information about the Python-3000
mailing list