[issue9896] Introspectable range objects

2011-11-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4643be424293 by Benjamin Peterson in branch 'default': add introspection to range objects (closes #9896) http://hg.python.org/cpython/rev/4643be424293 -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected stat

[issue9896] Introspectable range objects

2011-11-05 Thread Éric Araujo
Éric Araujo added the comment: I think this is ready for commit. -- nosy: +smarnach ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9896] Introspectable range objects

2011-10-17 Thread Ezio Melotti
Ezio Melotti added the comment: See also #13200. -- nosy: +ezio.melotti -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list maili

[issue9896] Introspectable range objects

2011-04-19 Thread Daniel Urban
Daniel Urban added the comment: Thanks, I've corrected my patch. -- Added file: http://bugs.python.org/file21733/range_attrs_3.patch ___ Python tracker ___ __

[issue9896] Introspectable range objects

2011-04-19 Thread Éric Araujo
Éric Araujo added the comment: Looks good, apart from the use of assertEquals (deprecated in favor of assertEqual). I’d also remove “merely” from the doc addition. -- nosy: +eric.araujo ___ Python tracker ___

[issue9896] Introspectable range objects

2011-04-17 Thread Daniel Urban
Daniel Urban added the comment: Now that the moratorium has already ended, I'll try again. I've updated the patch. It seems, that this idea has already came up in the past: Guido in msg70525 said: "I also think ranges should be introspectable, exposing their start, stop and step values just

[issue9896] Introspectable range objects

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > One other thought. If there is a perceived need, I would rather an > alternate approach that unifies a language a bit by letting range() > expose its arguments as a slice and modify its input to accept a slice. This sounds like an obscure complication to me.

[issue9896] Introspectable range objects

2010-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Range objects are new in 3.0; they supersede 2.x xrange objects, which are perhaps 10 years old. I do not remember that xrange objects had such attributes. On the other hand, I believe there were requests. The request, with either implementation, seems reason

[issue9896] Introspectable range objects

2010-09-19 Thread Daniel Urban
Daniel Urban added the comment: > What is the use case for this? The basic idea was, that in Python almost everything is introspectable, so why range objects aren't. It was pretty straightforward to implement it, so I've done it (actually when I was working on rangeobject.c, I was surprised

[issue9896] Introspectable range objects

2010-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: What is the use case for this? -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mail

[issue9896] Introspectable range objects

2010-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought. If there is a perceived need, I would rather an alternate approach that unifies a language a bit by letting range() expose its arguments as a slice and modify its input to accept a slice. >>> range(0, 20, 2).slice slice(0, 20, 20) >>> r

[issue9896] Introspectable range objects

2010-09-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't see anything wrong with this idea, but I don't really see a need for it either. AFAICT, this has never been requested in the 20 years that range() has been in Python. This is probably YAGNI. It may also be in violation of the language moratorium

[issue9896] Introspectable range objects

2010-09-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9896] Introspectable range objects

2010-09-18 Thread Daniel Urban
New submission from Daniel Urban : The attached patch adds the start, stop and step members to range objects, corresponding the contructor arguments. The patch also include tests and documentation changes. -- components: Interpreter Core files: range_attrs.diff keywords: patch messages