Re: [Python-3000] Allowing slice syntax in more places

2006-05-10 Thread Guido van Rossum
The problem is that it's a slippery slope. I think Paul Dubois once proposed this too, but not much came of it. Once you can write foo(1:10), why not x = (1:10); and then why not x = 1:10. But you can't have "if x == 1:10: ..." because the first colon would be ambiguous. So you'd end up with even m

[Python-3000] Allowing slice syntax in more places

2006-05-10 Thread Travis E. Oliphant
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