Skip to content

Commit 0d95ebc

Browse files
committed
Shorten ValueError messages
1 parent b61916a commit 0d95ebc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_itertools/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ def islice(p, start, stop=(), step=1):
343343
stop = start
344344
start = 0
345345
if stop is not None and stop < 0:
346-
raise ValueError("Stop for islice must be None or a non-negative integer")
346+
raise ValueError("stop must be None or >= 0")
347347
if start < 0:
348-
raise ValueError("Start for islice must be a non-negative integer")
348+
raise ValueError("start must be >= 0")
349349
if step <= 0:
350-
raise ValueError("Step for islice must be a positive integer")
350+
raise ValueError("step must be > 0")
351351

352352
# TODO: optimizing or breaking semantics?
353353
if stop is not None and start >= stop:

0 commit comments

Comments
 (0)