[docs] [issue14050] Tutorial, list.sort() and items comparability

Andy Maier report at bugs.python.org
Thu Jul 3 17:23:11 CEST 2014


Andy Maier added the comment:

Just out of curiosity: Why do the patches attached to this issue not have a "review" link?

Also, both (2.7 and 3.2) patches do not line up with the current 2.7 and 3.x tip, both hunks get rejected.

Comments on both patches:

1. It would be helpful if the text "Each item needs to define an ordering relationship." was followed by a statement about what happens when that is not the case (that is what Ezio also suggested), and where to look for details on how to define an ordering relationship. The problem with that is that there is no good place that is devoted to exactly that. The relatively best place for defining comparison I found so far is: https://docs.python.org/2.7/tutorial/datastructures.html#comparing-sequences-and-other-types and its 3.x equivalent.

2. The example that raises the TypeError is not needed, IMHO. This puts too much focus on the case that does not work. If we mention in the description that a TypeError is raised, that should be sufficient.

Andy

----------
nosy: +andymaier

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


More information about the docs mailing list