On Sun, Feb 26, 2017 at 10:23 PM qhlonline wrot
> Hi, all
> I have a suggestion that, the sort() member method of the list
> instance, should return the 'self' as the result of list.sort() call.
> Now list.sort() returns nothing, so that I can NOT write code like
> this:
>
> res = {
It sorts the list in place. Can you use sorted(item_list)?
-Ryan Birmingham
On 26 February 2017 at 22:07, qhlonline wrote:
> Hi, all
> I have a suggestion that, the sort() member method of the list
> instance, should return the 'self' as the result of list.sort() call.
> Now list.sort(
Hi, all
I have a suggestion that, the sort() member method of the list instance,
should return the 'self' as the result of list.sort() call.
Now list.sort() returns nothing, so that I can NOT write code like this:
res = {item: func(item) for item in item_list.sort()}
It feel
On 26.02.17 15:39, Vamsi Krishna Avula wrote:
This is somewhere between a question and a proposal. I'm just trying to
understand why Path objects use an explicit iterdir method.
Why not make them iterable?
Because this is ambiguous. Iterating can mean many different things:
1. Iterate charact
This is somewhere between a question and a proposal. I'm just trying to
understand why Path objects use an explicit iterdir method.
Why not make them iterable?
--
Vamsi
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailma