René's URL Explorer Experiment


Title: PEP 357 – Allowing Any Object to be Used for Slicing | peps.python.org

Open Graph Title: PEP 357 – Allowing Any Object to be Used for Slicing | peps.python.org

Description: This PEP proposes adding an nb_index slot in PyNumberMethods and an __index__ special method so that arbitrary objects can be used whenever integers are explicitly needed in Python, such as in slice syntax (from which the slot gets its name).

Open Graph Description: This PEP proposes adding an nb_index slot in PyNumberMethods and an __index__ special method so that arbitrary objects can be used whenever integers are explicitly needed in Python, such as in slice syntax (from which the slot gets its name).

Opengraph URL: https://peps.python.org/pep-0357/

direct link

Domain: peps.python.org

color-schemelight dark
og:typewebsite
og:site_namePython Enhancement Proposals (PEPs)
og:imagehttps://peps.python.org/_static/og-image.png
og:image:altPython PEPs
og:image:width200
og:image:height200
theme-color#3776ab

Links:

Pythonhttps://www.python.org/
PEP Indexhttps://peps.python.org/
Abstracthttps://peps.python.org/357#abstract
Rationalehttps://peps.python.org/357#rationale
Proposalhttps://peps.python.org/357#proposal
Specificationhttps://peps.python.org/357#specification
Implementation Planhttps://peps.python.org/357#implementation-plan
Discussion Questionshttps://peps.python.org/357#discussion-questions
Speedhttps://peps.python.org/357#speed
Why not use nb_int which is already there?https://peps.python.org/357#why-not-use-nb-int-which-is-already-there
Why the name __index__?https://peps.python.org/357#why-the-name-index
Why return PyObject * from nb_index?https://peps.python.org/357#why-return-pyobject-from-nb-index
Why can’t __index__ return any object with the nb_index method?https://peps.python.org/357#why-can-t-index-return-any-object-with-the-nb-index-method
Reference Implementationhttps://peps.python.org/357#reference-implementation
Referenceshttps://peps.python.org/357#references
Copyrighthttps://peps.python.org/357#copyright
Abstracthttps://peps.python.org/357#abstract
Rationalehttps://peps.python.org/357#rationale
Proposalhttps://peps.python.org/357#proposal
Specificationhttps://peps.python.org/357#specification
Implementation Planhttps://peps.python.org/357#implementation-plan
Discussion Questionshttps://peps.python.org/357#discussion-questions
Speedhttps://peps.python.org/357#speed
Why not use nb_int which is already there?https://peps.python.org/357#why-not-use-nb-int-which-is-already-there
Why the name __index__?https://peps.python.org/357#why-the-name-index
[1]https://peps.python.org/357#id2
Why return PyObject * from nb_index?https://peps.python.org/357#why-return-pyobject-from-nb-index
Why can’t __index__ return any object with the nb_index method?https://peps.python.org/357#why-can-t-index-return-any-object-with-the-nb-index-method
Reference Implementationhttps://peps.python.org/357#reference-implementation
Referenceshttps://peps.python.org/357#references
1https://peps.python.org/357#id1
https://mail.python.org/pipermail/python-dev/2006-February/thread.html#60594https://mail.python.org/pipermail/python-dev/2006-February/thread.html#60594
Copyrighthttps://peps.python.org/357#copyright
Abstracthttps://peps.python.org/357#abstract
Rationalehttps://peps.python.org/357#rationale
Proposalhttps://peps.python.org/357#proposal
Specificationhttps://peps.python.org/357#specification
Implementation Planhttps://peps.python.org/357#implementation-plan
Discussion Questionshttps://peps.python.org/357#discussion-questions
Speedhttps://peps.python.org/357#speed
Why not use nb_int which is already there?https://peps.python.org/357#why-not-use-nb-int-which-is-already-there
Why the name __index__?https://peps.python.org/357#why-the-name-index
Why return PyObject * from nb_index?https://peps.python.org/357#why-return-pyobject-from-nb-index
Why can’t __index__ return any object with the nb_index method?https://peps.python.org/357#why-can-t-index-return-any-object-with-the-nb-index-method
Reference Implementationhttps://peps.python.org/357#reference-implementation
Referenceshttps://peps.python.org/357#references
Copyrighthttps://peps.python.org/357#copyright
Page Source (GitHub)https://github.com/python/peps/blob/main/peps/pep-0357.rst?plain=1
https://github.com/python/peps/blob/main/peps/pep-0357.rsthttps://github.com/python/peps/blob/main/peps/pep-0357.rst
2025-02-01 08:55:40 UTChttps://github.com/python/peps/commits/main/peps/pep-0357.rst

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.