2009/7/3 Brad <schi...@gmail.com>: > Perhaps true, but it would be a nice convenience (for me) as a built- > in written in either Python or C. Although the default case of a bool > function would surely be faster.
The chance of getting this accepted as a builtin is essentially zero. To be a builtin, as opposed to being in the standard library, something has to have a very strong justification. This suggestion may find a home in the standard library, although it's not entirely clear where (maybe itertools, although it's not entirely obvious that it's a fit there). You'd have to justify this against the argument "not every 2-3 line function needs to be built in". Personally, I'm not sure it passes that test - sure, it's a useful function, but it's not that hard to write when you need it. It may be better as a recipe in the cookbook. Or if it's close enough to the spirit of the itertools, it may be suitable as a sample in the itertools documentation (the "recipes" section). Paul. -- http://mail.python.org/mailman/listinfo/python-list