We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13f0323 commit 486d7aeCopy full SHA for 486d7ae
graalpython/lib-graalpython/itertools.py
@@ -29,8 +29,8 @@ class repeat():
29
def __init__(self, obj, times=None):
30
self.obj = obj
31
self.times = times
32
- if not isinstance(times, int):
33
- raise TypeError("integer argument expected, got float")
+ if times is not None and not isinstance(times, int):
+ raise TypeError(f"integer argument expected, got {times.__class__.__name__}")
34
self.count = times if times and times > 0 else 0
35
36
@__graalpython__.builtin_method
0 commit comments