Ellipsis outside a slice

C

Chris Perkins

Is there a reason why the ... notation as a literal for Ellipsis is
only allowed inside a slice? Would allowing it elsewhere frighten the
parser?

Chris Perkins
 
T

Terry Reedy

Chris Perkins said:
Is there a reason why the ... notation as a literal for Ellipsis is
only allowed inside a slice? Would allowing it elsewhere frighten the
parser?

It would complicate the parser for no purpose. One can already access
the singleton ellipsis object by it name -- Ellipsis. It was invented
and added for use in extended slices by Numerical Python and has no
grammatical use outside slices.

TJR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top