On Sat, 18 Jul 2020 at 10:02, Inada Naoki <songofaca...@gmail.com> wrote:

> On Sat, Jul 18, 2020 at 7:05 AM Marco Sulla
> <marco.sulla.pyt...@gmail.com> wrote:
> > For what I know, CPython uses PyDictObject for kwargs. Since dicts are
> > mutable, it's a problem to cache them properly.
>
> On caller side, Python doesn't use dict at all.
> On callee side, dict is used for `**kwargs`.  But changing it to
> frozendict is
> backward incompatible change.
>

Not sure of what you mean with caller and callee. If you're talking about
Python, I agree, kwargs must be dicts. But I was talking about CPython and
PyDictObject, that is used internally for kwargs.

On Sat, 18 Jul 2020 at 10:02, Inada Naoki <songofaca...@gmail.com> wrote:

> Currently, `for k,v in d.items()`
> doesn't create
> temporary list or set-like.
> I think using "real object" is not good performance optimization.
>

Well, this is true... but they create view objects that are quite slow.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to