[Python-Dev] Proposal: dict.with_values(iterable)
Inada Naoki
songofacandy at gmail.com
Tue Apr 23 11:53:10 EDT 2019
More information about the Python-Dev mailing list
Tue Apr 23 11:53:10 EDT 2019
- Previous message (by thread): [Python-Dev] Proposal: dict.with_values(iterable)
- Next message (by thread): [Python-Dev] Proposal: dict.with_values(iterable)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Apr 24, 2019 at 12:28 AM Steve Dower <steve.dower at python.org> wrote: > > > > > But if the original dictionary wasn't created with shared keys... the > > copy can't share them either. Or are you suggesting adding new code to > > create a shared key dictionary from one that isn't? > > This is a good point. Maybe dict.fromkeys() could do it? Or a > sys.intern-like function (which is why I brought up that precedent). The > point is to make it an optional benefit rather than strict > language/library semantics. > Then, why not support values when creating key sharing dict? That's one form of my proposal :) -- Inada Naoki <songofacandy at gmail.com>
- Previous message (by thread): [Python-Dev] Proposal: dict.with_values(iterable)
- Next message (by thread): [Python-Dev] Proposal: dict.with_values(iterable)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list