[issue22868] Minor error in the example of filter()

Georg Brandl report at bugs.python.org
Fri Nov 14 08:38:27 CET 2014


Georg Brandl added the comment:

For me the text is correct.  However, it depends on parsing the English sentence in the right way, which can be confusing.  The prose means "not (divisible by 2 or 3)" which is equivalent to "not divisible by 2 and not divisible by 3", therefore the Python code has an "and" operator.

It would probably be best to remove the negation, which also removes the ambiguity: "compute a sequence of numbers divisible by 2 or 3" or such.

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22868>
_______________________________________


More information about the Python-bugs-list mailing list