Skip to content

Should sequences support negative indices? #4

@simpleigh

Description

@simpleigh

The Python language specification states:

The formal syntax makes no special provision for negative indices in sequences; however, built-in sequences all provide a getitem() method that interprets negative indices by adding the length of the sequence to the index (so that x[-1] selects the last item of x).

Should we support this for sequence types in the library that support index access?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions