17 Aug
2021
17 Aug
'21
5:54 p.m.
On 12Aug2021 17:45, Ricky Teachey <ricky@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 <cs@cskk.id.au>