Ellipsis outside a slice

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Perkins

    Ellipsis outside a slice

    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
  • Terry Reedy

    #2
    Re: Ellipsis outside a slice


    "Chris Perkins" <chrisperkins37 @hotmail.com> wrote in message
    news:45228044.0 310081250.5b51e 811@posting.goo gle.com...[color=blue]
    > Is there a reason why the ... notation as a literal for Ellipsis is
    > only allowed inside a slice? Would allowing it elsewhere frighten[/color]
    the[color=blue]
    > parser?[/color]

    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


    Comment

    Working...