On PEP 322 (ireverse)

Anna revanna at mn.rr.com
Mon Nov 3 02:13:50 EST 2003


On Mon, 03 Nov 2003 05:01:10 +0000, Dave Benjamin wrote:
 
> Pardon me for missing this, but what was the rationale for not just calling
> it "reverse" and putting it in builtins? And likewise for "sort"?

reverse and sort already exist in Python, as list methods.

L.reverse() reverses, in-place, the items of list L. 
L.sort([f]) Sorts, in-place, the items of L, comparing items by f; 
	if f is ommitted, cmp is used as comparison function. 
(pg 49, _Python in a Nutshell_)

Anna




More information about the Python-list mailing list