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/
Domain: peps.python.org
| color-scheme | light dark |
| og:type | website |
| og:site_name | Python Enhancement Proposals (PEPs) |
| og:image | https://peps.python.org/_static/og-image.png |
| og:image:alt | Python PEPs |
| og:image:width | 200 |
| og:image:height | 200 |
| theme-color | #3776ab |
Links:
Viewport: width=device-width, initial-scale=1.0