Message191600
[guest@localhost cpython]$ ./python
Python 3.4.0a0 (default, Jun 22 2013, 04:24:17)
[GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import itertools
>>> print(range.__doc__, slice.__doc__, itertools.islice.__doc__, sep='\n***\n')
range(stop) -> range object
range(start, stop[, step]) -> range object
Returns a virtual sequence of numbers from start to stop by step.
***
slice(stop)
slice(start, stop[, step])
Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).
***
islice(iterable, [start,] stop [, step]) --> islice object
Return an iterator whose next() method returns selected values from an
iterable. If start is specified, will skip all preceding elements;
otherwise, start defaults to zero. Step defaults to one. If
specified as another value, step determines how many values are
skipped between successive calls. Works like a slice() on a list
but returns an iterator.
>>>
I have updated the patch |
|
Date |
User |
Action |
Args |
2013-06-21 17:31:33 | py.user | set | recipients:
+ py.user, akuchling, rhettinger, r.david.murray, docs@python |
2013-06-21 17:31:33 | py.user | set | messageid: <1371835893.84.0.35746444083.issue18220@psf.upfronthosting.co.za> |
2013-06-21 17:31:33 | py.user | link | issue18220 messages |
2013-06-21 17:31:33 | py.user | create | |
|