mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Put more useful information into the docstring for utils.seq.window.
This commit is contained in:
parent
8693dbd5cc
commit
00fc0584ed
@ -28,7 +28,9 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
def window(L, size):
|
def window(L, size):
|
||||||
"""Returns a sliding 'window' through the list L of size size."""
|
"""list * size -> window iterable
|
||||||
|
|
||||||
|
Returns a sliding 'window' through the list L of size size."""
|
||||||
assert not isinstance(L, int), 'Argument order swapped: window(L, size)'
|
assert not isinstance(L, int), 'Argument order swapped: window(L, size)'
|
||||||
if size < 1:
|
if size < 1:
|
||||||
raise ValueError, 'size <= 0 disallowed.'
|
raise ValueError, 'size <= 0 disallowed.'
|
||||||
|
Loading…
Reference in New Issue
Block a user