Bengt Richter wrote:
> >>> def my_search(another, keys, x): return dict((k,another[k]) for k in
> keys if another[k]>x)
> ...
> >>> my_search(another, 'cb', .3)
> {'b': 0.35806602909756235}
> >>> my_search(another, 'abcd', .4)
> {'a': 0.60649466203365532, 'd': 0.77440643221840166}
>
Do you need to guard the case "k not in another" ?-- http://mail.python.org/mailman/listinfo/python-list
