@@ -23,7 +23,7 @@ returns a new sorted list::
2323 >>> sorted([5, 2, 3, 1, 4])
2424 [1, 2, 3, 4, 5]
2525
26- You can also use the :meth: `list.sort ` method of a list . It modifies the list
26+ You can also use the :meth: `list.sort ` method. It modifies the list
2727in-place (and returns *None * to avoid confusion). Usually it's less convenient
2828than :func: `sorted ` - but if you don't need the original list, it's slightly
2929more efficient.
@@ -87,9 +87,9 @@ Operator Module Functions
8787=========================
8888
8989The key-function patterns shown above are very common, so Python provides
90- convenience functions to make accessor functions easier and faster. The operator
91- module has :func : `operator.itemgetter `, :func: `operator.attrgetter `, and
92- an :func: `operator.methodcaller ` function.
90+ convenience functions to make accessor functions easier and faster. The
91+ :mod : `operator ` module has :func: `~ operator.itemgetter `,
92+ :func: ` ~operator.attrgetter `, and an :func: `~ operator.methodcaller ` function.
9393
9494Using those functions, the above examples become simpler and faster:
9595
@@ -248,15 +248,15 @@ To convert to a key function, just wrap the old comparison function:
248248 [5, 4, 3, 2, 1]
249249
250250In Python 3.2, the :func: `functools.cmp_to_key ` function was added to the
251- functools module in the standard library.
251+ :mod: ` functools ` module in the standard library.
252252
253253Odd and Ends
254254============
255255
256256* For locale aware sorting, use :func: `locale.strxfrm ` for a key function or
257257 :func: `locale.strcoll ` for a comparison function.
258258
259- * The *reverse * parameter still maintains sort stability (i.e. records with
259+ * The *reverse * parameter still maintains sort stability (so that records with
260260 equal keys retain the original order). Interestingly, that effect can be
261261 simulated without the parameter by using the builtin :func: `reversed ` function
262262 twice:
0 commit comments