> > option somehow. But since (a) at least 60% of the examples are > > satisfied with something like irevrange(), and (b) having irevrange() > > I'm not sure it's as high as that, depending on how strictly one wants > to define "satisfied". There are 6 bullets in PEP 322's "real world use cases" section. The first one is not helped by reversed(). Of the remaining 5, three are simple numeric ranges (heapq.heapify(), platform.dist_try_harder() and random.shuffle()). That's exactly 60%. :-) > for i, value in reversed(enumerate(listofnum)): Sorry, this doesn't work. enumerate() returns an iterator, reversed() requires a sequence. > > If you can prove it would be used as frequently as sum() you'd have a > > point. > > No, not as frequently as sum, but then this applies to many other > builtins. Well, they are already there, and we're considering removing some. I'd like to set the bar for *new* builtins fairly high. (You all know the joke how Aspirin would never have been approevd by the FDA as an over-the-counter drug if it was invented today.) --Guido van Rossum (home page: http://www.python.org/~guido/)
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