[docs] Prime numbers

Daniel Smith dfsmith at dfsmith.net
Fri Sep 23 09:03:31 CEST 2011


In section 5.1.3 for filter() at
http://docs.python.org/tutorial/datastructures.html;
the description says "For example, to compute primes up to 25:"

However, the output "[5, 7, 11, 13, 17, 19, 23]" omits both the prime 2 
and the prime 3.  (And would list many non-primes >24 if the range were 
increased.)

The example is still useful and relevant, but the description is very 
misleading.

(In fact, I might cite the page on Wikipedia as a sieve algorithm, and 
see how many times 25 is listed as prime... B-)



Daniel Smith, nitpicker.


More information about the docs mailing list