This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Subclassing slice objects
Type: enhancement Stage: test needed
Components: Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mariode1, rhettinger
Priority: normal Keywords:

Created on 2020-03-14 05:35 by mariode1, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg364143 - (view) Author: Mario de OOurtzborun (mariode1) Date: 2020-03-14 05:34
Is there any reason why slice objects aren't subclassable? I want a mutable slice object, but there is no way to create one that will work with lists or tuples. And __index__ method requires to return int. I want to prepare a git merge request about this issue if there is no specific reason to forbid them becoming a base class.
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84144
2020-03-20 18:50:24terry.reedysetstage: test needed
type: enhancement
versions: + Python 3.9
2020-03-14 07:04:38rhettingersetnosy: + rhettinger
2020-03-14 05:35:00mariode1create