"Find" in list of objects

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Thu Oct 23 07:40:27 EDT 2008


Andreas Müller:
> is there a construct like
> list.find (10, key='ID')

Given the current Python a syntax like this is more probable:

somelist.find(10, key=attrgetter('ID'))

Bye,
bearophile



More information about the Python-list mailing list