Fix deprecation warning triggered by PEP 479
This commit is contained in:
parent
316220b742
commit
be6ddd4bb2
@ -29,15 +29,15 @@
|
||||
(try (while True
|
||||
(yield (get self index))
|
||||
(setv index (inc index)))
|
||||
(except [_ IndexError]
|
||||
(raise StopIteration))))
|
||||
(except [IndexError]
|
||||
(return))))
|
||||
--len-- (fn [self]
|
||||
"length of the sequence, dangerous for infinite sequences"
|
||||
(setv index (. self high-water))
|
||||
(try (while True
|
||||
(get self index)
|
||||
(setv index (inc index)))
|
||||
(except [_ IndexError]
|
||||
(except [IndexError]
|
||||
(len (. self cache)))))
|
||||
max-items-in-repr 10
|
||||
--str-- (fn [self]
|
||||
|
@ -422,7 +422,10 @@ Raises ValueError for (not (pos? n))."
|
||||
(for* [val citer]
|
||||
(yield val)
|
||||
(for* [_ (range skip)]
|
||||
(next citer))))
|
||||
(try
|
||||
(next citer)
|
||||
(except [StopIteration]
|
||||
(return))))))
|
||||
|
||||
(defn zero? [n]
|
||||
"Check if `n` equals 0."
|
||||
|
Loading…
Reference in New Issue
Block a user