On Tue, Mar 5, 2019 at 7:59 PM Steven D'Aprano <[email protected]> wrote:
>
> On Tue, Mar 05, 2019 at 06:04:40PM +0900, INADA Naoki wrote:
> [...]
> > One obvious merit of d.merge(...) is it returns same type of d.
> > `type(d1)(d1, d2)` looks ugly.
> >
> > But people just want dict instead of some subtype of dict.
> > This merit is not so important.
>
> Not to me! It *is* important to me.

I'm sorry, I missed "most".

>
> I want builtins to honour their subclasses. It is probably too late to
> change existing behaviour, but my proposal specifies that subclasses are
> honoured.
>

Then my proposal `d1.merge(d2)` is much better than alternative
dict(d1, d2) for you.

-- 
Inada Naoki  <[email protected]>
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to