Forgive me, and be kind, as I am just a newby learning this language
out of M.L. Hetland's book.  The following behavior of 2.4.1 seems very
strange
>>> x = ['aardvark', 'abalone', 'acme', 'add',
     'aerate']
>>> x.sort(key=len)
>>> x
['add', 'acme', 'aerate', 'abalone', 'aardvark']
>>> x.sort(reverse=True)
>>> x
['aerate', 'add', 'acme', 'abalone', 'aardvark']
The function called on line 4, at least to me, should work on x as it
was on line 3, not the previously existing x on line 1.  What gives?
By the way these functions do not exist in 2.3.5 so they must be newly
implemented.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to