On 2022-02-16 10:45, Steven D'Aprano wrote:
> On Wed, Feb 16, 2022 at 09:44:07AM -0300, Soni L. wrote:
> > This might be a silly idea but, would it be a good idea to have
> > ...[a:b:c] return a range(a, b, c)?
>
> Similar ideas have been suggested before:
>
> https://mail.python.org/archives/list/python-ideas@python.org/thread/W44PPBJJXETTBQHWCMJB3DRCD6CTXWJT/
>
> https://bugs.python.org/issue42956
>
> What benefit do you see in writing [a:b:c] instead of range(a, b, c)?
>
>
>
*nod* we see.
syntax constructs like these are mostly about taste. it's like being
able to write generators in function calls like list(x for x in foo),
but also having (x for x in foo) instead of using a gen(x for x in foo)
function.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/G2ZYUPM5MARUMELUV4FDDHJS6O6H42TB/
Code of Conduct: http://python.org/psf/codeofconduct/