On 12Aug2021 17:45, Ricky Teachey <[email protected]> wrote:
>and of course native python sequences already have far better syntactic
>sugar than ellipses:
>
>[][3:]
>[][::-1]
>
>etc etc.
>
>So given that, why would we ever want to use ellipses?!?!

I've got an I/O module where the take(n) call accepts an Ellipsis to 
mean "everything to the end of input". I know Python file.read() without 
a parameter also means that, but the idiom of my module uses take(n) to 
obtain exactly n bytes, so the Ellipsis is a good fit. Of course 
expressed as "...".

Cheers,
Cameron Simpson <[email protected]>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LLDPHKLDYISCTUDRETE5GEE3XB6XT6KL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to