I see that Python 2.5 will include a simple implementation of any/all. What I would like to ask, before it's too late, is if it's possible to add an optional test argument. any(iterable, test=bool) and all(iterable, test=bool) These would be the new proposed APIs. The usecase is to be able to extract attributes from objects or simply to have arbitrary checks like: import operator any(some_objects, test=operator.attrgetter('some_attribute')) or def zerop(x): return x==0 all(some_objects, zerop) instead of preprocessing the generator with a generator expression before passing it to any/all. Thanks. -- Valentino Volonghi aka Dialtone Now Running MacOSX 10.4 Blog: http://vvolonghi.blogspot.com http://weever.berlios.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20051227/e76dae5b/attachment.pgp
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4