On Friday 17 October 2003 11:50 pm, Guido van Rossum wrote: > > Yes. But don't mind me, I'm still sad that we have range and xrange > > when iter(a:b) and list(a:b:c) would be SUCH good replacements for > > them if slicing-notation was accepted elsewhere than in indexing, > > This has been proposed more than once (I think the last time by Paul > Dubois, who wanted x:y:z to be a general expression), and has a > certain elegance, but is probably too terse. Perhaps mandatory parentheses around it (as sole argument in a function call, say) might make it un-terse enough for acceptance...? The frequence of counted loops IS such that replacing for x in range(9): ... with for x in (0:9): ... WOULD pay for itself soon in reduced wear and tear on keyboards...;-) [Using iter(0:9) instead would be only "conceptually neat", no typing advantage on range -- conceded]. Alex
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