Another update for an Issue #352

This commit is contained in:
Miroslav Stampar
2013-03-13 19:42:22 +01:00
parent 2f43c3eb9b
commit eb08c8d752
4 changed files with 72 additions and 4 deletions

View File

@@ -9,6 +9,14 @@ class xrange(object):
"""
Advanced (re)implementation of xrange (supports slice/copy/etc.)
Reference: http://code.activestate.com/recipes/521885-a-pythonic-implementation-of-xrange/
>>> foobar = xrange(1, 10)
>>> 7 in foobar
True
>>> 11 in foobar
False
>>> foobar[0]
1
"""
__slots__ = ['_slice']