<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Thu, Jul 12, 2018, 9:31 AM Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">12.07.18 15:15, David Mertz пише:<br>
> On Thu, Jul 12, 2018, 7:56 AM Serhiy Storchaka <br>
I didn't mean any concrete implementation. Sure there are enough <br>
efficient and simple. I sometimes need a sequence of prime numbers for <br>
solving toy problems, and quickly write something like:<br>
<br>
def primes(n):<br>
     return (i for i in range(2, n) if all(i % j for j in <br>
primes(int(sqrt(i)) + 1)))<br>
<br>
Having such feature in the stdlib would be very convenient. Any <br>
reasonable implementation is enough efficient for my purposes.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">That's the point I was getting at. "For your purposes" isn't general enough to include in the standard library. There are quite a few algorithms and efficiency trade-offs to decide on. It's not clear to me that any choice is sufficiently "one size fits all" to include.</div><div dir="auto"><br></div><div dir="auto">I'm not saying there definitely IS NOT a reasonable compromise approach to these things, but I'd have to judge concrete suggestions... Or better still, people with better knowledge of number theory than mine should make those judgements.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>