On 2/07/2006 6:01 AM, [EMAIL PROTECTED] wrote:
> This has been bothering me for a while.
[snip]
Summary of OP's post: d.keys() and d.values() should return sets in
Python 3.0.
Observations:
(1) My code [some of which dates back to Python 1.5.1] uses about 12 x
d.items() and 11 x d.keys() for each 1 x d.values()
(2) Most cases of d.X() don't need/want the untrammelled list and could
be replaced by d.iterX(). Example: max_frequency = max(tally.values())
Opinion: d.X() could be deprecated, but I'd rather see a
consciousness-raising for the d.iterX() methods, and for the construct
for key in d:
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list