Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stdlib] Parameterize __getitem__ and __setitem__ in stdlib types #2384

Closed
wants to merge 1 commit into from

Commits on May 16, 2024

  1. Use __index__ for __getitem__ and __setitem__

    When indexing stdlib containers we should accept a generic type that calls
    on the  __index__ method to allow types other than Int to be used but
    doesn't allow Intable types that should not be used for such purposes
    (such as Float)
    
    Signed-off-by: Brian Grenier <grenierb96@gmail.com>
    bgreni committed May 16, 2024
    Configuration menu
    Copy the full SHA
    e541ebc View commit details
    Browse the repository at this point in the history