[Python-ideas] change list() - branch from "More useful slices"

Thomas Kluyver thomas at kluyver.me.uk
Mon Feb 2 20:47:28 CET 2015


On 2 February 2015 at 11:43, Paul Moore <p.f.moore at gmail.com> wrote:

> So there would be a discontinuity - list('foo') would have to be ['f',
> 'o', 'o'] for backward compatibility. And that makes list(*args)
> problematic, as it behaves differently if len(args)==1.
>

max() and min() do behave like this - they accept either a single iterable,
or *args - so it's not unprecedented. But I don't see any benefit to adding
it to the list() constructor.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150202/08815fb0/attachment.html>


More information about the Python-ideas mailing list