On 12Aug2021 17:45, Ricky Teachey <ri...@teachey.org> 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 <c...@cskk.id.au> _______________________________________________ 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/LLDPHKLDYISCTUDRETE5GEE3XB6XT6KL/ Code of Conduct: http://python.org/psf/codeofconduct/