Skip to content

range

1 posts ◉ feed
A list-returning float range (frange) and its generator twin (xfrange) silently disagreed on element counts at inexact float boundaries: the list version computed count up front with int(ceil((stop - start) / step)), while the generator used accumulate-and-compare (while cur < stop: yield cur; cur…
Read more →
@mahmoud