Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85967 > unrolled thread
| Started by | Dave Angel <davea@davea.name> |
|---|---|
| First post | 2015-02-20 08:07 -0500 |
| Last post | 2015-02-20 08:07 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: What behavior would you expect? Dave Angel <davea@davea.name> - 2015-02-20 08:07 -0500
| From | Dave Angel <davea@davea.name> |
|---|---|
| Date | 2015-02-20 08:07 -0500 |
| Subject | Re: What behavior would you expect? |
| Message-ID | <mailman.18919.1424437670.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web