Le 03/03/2017 à 22:21, Chris Barker a écrit :
> On Fri, Mar 3, 2017 at 12:21 PM, Sven R. Kunze <srku...@mail.de
> <mailto:srku...@mail.de>> wrote:
> 
>>     For my part, I think casting a list to a dict is often the RIGHT
>>     way to address these issues.
> 
>     You can't be serious about this. Especially because it would negate
>     your response to Ed "conditional on a len() call is the way to go".
>     Now you tell people to use "convert to dict".
> 
> 
> I am serious. It depends on the use case. If the data are an

But that's the all problem isn't it?

Since the start of the discussion, contesters have been offering
numerous solutions, all being contextual and with gotchas, none being
obvious, simple or elegant.

The best is still try/except.

"There should be one obvious way to do it" right?

Plus Sven already estimated the implementation would not be very hard.
So we have one obvious solution to a problem that:

- several professional programmers said they have
- has a similar API in another built-in
- has currently no elegant solutions

The proposal is actionable, the cost of it seems low, and it's not
remotely controversial.

I get that on Python-idea you get "no" by default, but here we are
having such resistance for a feature that is light to implement, does
not clutter anything, does solve a problem, and is congruent with other
APIs.

Honestly what evil would happen if it's get accepted ?

This is not a "yeah but we can't accept everything that goes in or we
would bloat Python" thing.

If somebody tells me that no one want to spend time to code it, I can
understand. Everybody's has a life, and somebody else's pony can wait.
And since I can't code in C I can't do it. But that doesn't seem to be
the problem here.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to