Tshepang Lekhonkhobe <tshep...@gmail.com> added the comment:

> Find attached. Note that I kept some of those anti-pattern examples
> you mentioned, and then later on introduced your preferred way of
> doing things (using action="count" and ">=" checks instead of "=="
> ones).

Reason I kept those is to easily lead the reader into the "more
correct" way of doing things, by first doing them in a more obvious
but less ideal way.

For example, when the goal of one is to teach one to remove duplicates
from list, it's nice if you first do the process manually, and then
later on introduce the set() type, just so the user can appreciate
them more. Same applies to doing "for item in range(len(iterable))"
vs. "for item in iterable".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to