On Tue, Dec 21, 2010 at 5:12 PM, Nick Coghlan <ncogh...@gmail.com> wrote: > I actually agree with Guido that anything we do is going to be > suboptimal in some way. Encouraging the actual/expected ordering and > updating the diff output so "expected=old" strikes me as least bad, > but using the neutral first/second terminology and doing the diffs as > "first=old" wouldn't be terrible (although I'm personally -0 on it > because it encourages putting the expected value first in order to get > the diffs the right way around when an error occurs).
There are several problems with the actual/expected terminology. First of all, the arguments are primarily thought of as (and look) positional, not as having names (and there's nothing you can do about this in the docs -- people copy code without reading docs). Furthermore, Java's jUnit puts expected first (and makes this part of the culture/religion), so people coming from there will use that order and be freaked out if you were to swap them. And last, the order of diff arguments (old new) is also ingrained in the culture (which actually matches the expected/actual order in my mind). I think the least bad thing would be to drop any remnants of expected/actual terminology, keep the diffs in the first-second order, and let developers choose whether they put the expected value first or second. Then of course there will still be the examples in the doc (which some people *do* read and copy) -- I suppose we could alternate here to emphasize that we don't have a preferred order. -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com