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: Add start, stop and step attributes to range objects
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Introspectable range objects
View: 9896
Assigned To: Nosy List: daniel.urban, eric.araujo, ezio.melotti, mark.dickinson, pitrou, rhettinger, smarnach, terry.reedy
Priority: normal Keywords: needs review, patch

Created on 2011-10-17 14:29 by smarnach, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
range-members.patch smarnach, 2011-10-17 15:14 review
Messages (6)
msg145701 - (view) Author: Sven Marnach (smarnach) Date: 2011-10-17 14:28
As discussed on python-ideas [1], range objects should expose their start, stop and step values as read-only data attributes.  I've attached a patch to this end.

I'll open a separate issue for range comparison.

[1]: http://mail.python.org/pipermail/python-ideas/2011-October/012356.html
msg145706 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-17 14:58
I would add tests that check the read-only-ness.
msg145710 - (view) Author: Sven Marnach (smarnach) Date: 2011-10-17 15:14
Thanks, Éric.  Added new version of the patch.  (Could I also edit the old one?)
msg145711 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-10-17 15:24
There's actually a similar proposal with a patch and a few comments in #9896.
msg145724 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-17 16:14
> (Could I also edit the old one?)
If you want to remove the older version, follow the edit link on the right.  In case you don’t have the permissions, I’ll do it.
msg147095 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-05 16:10
The other bug is older and has more discussion, I’m closing this one as duplicate.
History
Date User Action Args
2022-04-11 14:57:22adminsetgithub: 57409
2011-11-05 16:11:15eric.araujosetstatus: open -> closed
resolution: duplicate
superseder: Introspectable range objects
stage: patch review -> resolved
2011-11-05 16:10:54eric.araujosetmessages: + msg147095
2011-10-17 16:14:58eric.araujosetfiles: - range-members.patch
2011-10-17 16:14:42eric.araujosetmessages: + msg145724
2011-10-17 15:24:42ezio.melottisetnosy: + rhettinger, terry.reedy, pitrou, daniel.urban
messages: + msg145711
2011-10-17 15:14:22smarnachsetfiles: + range-members.patch

messages: + msg145710
2011-10-17 14:58:38eric.araujosetnosy: + eric.araujo
messages: + msg145706
2011-10-17 14:54:02mark.dickinsonsetnosy: + mark.dickinson
2011-10-17 14:30:11ezio.melottisetkeywords: + patch, needs review
nosy: + ezio.melotti
stage: patch review

versions: + Python 3.3
2011-10-17 14:29:00smarnachcreate