Message158041
| Author |
billje |
| Recipients |
billje, eric.smith, mark.dickinson |
| Date |
2012年04月11日.15:06:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334156764.4104.YahooMailNeo@web161906.mail.bf1.yahoo.com> |
| In-reply-to |
<1334147336.74.0.0574888372172.issue14542@psf.upfronthosting.co.za> |
| Content |
Mark and Eric......
Wonderful! I got it now. I used x.sort(reverse=True) and x.sort(reverse=False) and it works just fine. Thanks for your help.
Bill......
Regards from:
William Jefferson Photography
514 Daniels St., #211
Raleigh, NC 27605
Cell Phone: (919) 931-6681
EMail: shaggers3@yahoo.com
Brides & Weddings: http://www.WilliamJeffersonPhotography.com
Special Events: http://www.DancingLight.org
________________________________
From: Mark Dickinson <report@bugs.python.org>
To: shaggers3@yahoo.com
Sent: Wednesday, April 11, 2012 8:28 AM
Subject: [issue14542] reverse() doesn't reverse sort correctly
Mark Dickinson <dickinsm@gmail.com> added the comment:
Bill,
list.reverse doesn't do any *sorting* at all; it merely *reverses* the list contents.
[2, 4, 3, 1]
If you want to do a reverse sort, you can either first sort normally and then reverse the result, or (easier) use the 'reverse' keyword argument to the list.sort method, as follows:
[4, 3, 2, 1]
I suspect Eric meant to write "does not reverse sort" instead of "does not reverse".
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14542>
_______________________________________ |
|