[Python-3000] Allowing slice syntax in more places
Travis E. Oliphant
oliphant.travis at ieee.org
Wed May 10 23:13:55 CEST 2006
I'm sorry if this has been discussed before.
One of the things that is really nice about slice syntax is the ability
to construct slice objects to pass to __getitem__ using []
Would it be possible to extend the syntax so that slice syntax is
acceptable in more places in Python? In particular function calls would
be a very useful addition. Thus,
myfunc(3:4:0.5, 1:5)
would produce the equivalent bytecode as
myfunc(slice(3,4,0.5), slice(1,5))
-Travis
More information about the Python-3000
mailing list