Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85967
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <davea@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.086 |
| X-Spam-Evidence | '*H*': 0.83; '*S*': 0.00; 'subject:would': 0.07; 'true)': 0.09; 'hmm.': 0.16; 'none.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "i'm": 0.30; 'figure': 0.32; 'guess': 0.33; "i'd": 0.34; 'really': 0.36; 'returning': 0.36; 'subject:?': 0.36; 'jason': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; "you'll": 0.62; 'charset:windows-1252': 0.65; 'received:74.208': 0.68; 'reverse': 0.68; 'subject:you': 0.87 |
| Date | Fri, 20 Feb 2015 08:07:29 -0500 |
| From | Dave Angel <davea@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: What behavior would you expect? |
| References | <CANy1k1g+wU6VUifZpV5+DWendT2LqS-PhRA-KC5hmq2xQ_uy+A@mail.gmail.com> <CANy1k1gMgGnqNcgTwjcqfYH-QctZthv89uXcU8SV9Uk6Wji=4A@mail.gmail.com> <CAPTjJmpeYwsQ=XLu5WicVEnqMZpvKJueZRrM9WGafcEm1BFatg@mail.gmail.com> <CANy1k1j8ni7TtZPq_a2r8TUvY13rh0oY8xt-t6+9KPxwfAYEyw@mail.gmail.com> <CAPTjJmpq3t4qb+VD+uL6w+=_wf5v0BFThYFM+a8JAe2RDXpTYg@mail.gmail.com> <CANy1k1j+_boVW4EP=fijUKFVRctzD8EETm3kZ==eoezA=S=a6Q@mail.gmail.com> |
| In-Reply-To | <CANy1k1j+_boVW4EP=fijUKFVRctzD8EETm3kZ==eoezA=S=a6Q@mail.gmail.com> |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:t8+svBcJfaumobv/IgN9PvZnp9rXJOWYF2yTmpPmfVj 1W4RtLk1JFHVxjjfNKB9zdNl2WdDHXMr4qWRecbMSdchASIPWS PZ02Bw28GaW00n4qklqdpBk4xXahbwMpDnwEKiLlse01aTQrPa MOh2GtasTSa44+yBgnPjpRJwHC3/d34rp7dVYjbW75fHwaGGpa beH3W04rc3fRGeWRwBsZq/sPndrO+kgYcAw1UspBFVI0ZfS17X 2SmAm3gxJJPYcH+OBbIelSgazTZyE/SBSe6pJxBe2QCX+l1JrZ UymUgw6/eyaInoaLQI/AVlH9G/q11QqKY7QgZRmY+1N6e2lXQ= = |
| X-UI-Out-Filterresults | notjunk:1; |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18919.1424437670.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1424437670 news.xs4all.nl 2925 [2001:888:2000:d::a6]:55764 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:85967 |
Show key headers only | View raw
On 02/20/2015 12:51 AM, Jason Friedman wrote:
>>
>> I'd still advise using my_list.sort() rather than sorted(), as you
>> don't need to retain the original.
>>
>>
> Hmm.
>
> Trying to figure out what that looks like.
> If I understand correctly, list.sort() returns None.
> What would I return to the caller?
>
return_list = ....
return_list.sort(key=..., reverse = True)
return return_list
>
> Oops, guess I'm not really returning a list, I'm returning an iterator.
Now you'll be returning a list, I believe.
--
DaveA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: What behavior would you expect? Dave Angel <davea@davea.name> - 2015-02-20 08:07 -0500
csiph-web