On Fri, 22 Feb 2013 17:40:29 +0000 (UTC) Wolfgang Maier email@example.com wrote:
Nick Coghlan <ncoghlan@...> writes:
-1 from me as well. We don't even implement concatenation and repetition for ranges in order to keep them simple - we have to caveat the range docs to point out they don't *quite* implement the full sequence API due to this restriction.
However, I will note that starting in Python 3.3, range objects expose their "start", "stop" and "step" attributes. That makes it much easier for third party software to manipulate them arithmetically.
Any plans to make range a valid base class to build upon in future releases?
I suppose it wouldn't very difficult to make range subclassable. You can try writing a patch if you want: http://docs.python.org/devguide/