[Python-Dev] PEP 509: Add a private version to dict
Maciej Fijalkowski
fijall at gmail.com
Wed Jan 20 14:02:53 EST 2016
More information about the Python-Dev mailing list
Wed Jan 20 14:02:53 EST 2016
- Previous message (by thread): [Python-Dev] PEP 509: Add a private version to dict
- Next message (by thread): [Python-Dev] PEP 509: Add a private version to dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 20, 2016 at 8:00 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote: > > > On 2016-01-20 1:36 PM, Maciej Fijalkowski wrote: >> >> On Wed, Jan 20, 2016 at 7:22 PM, Brett Cannon <brett at python.org> wrote: >>> >>> >>> On Wed, 20 Jan 2016 at 10:11 Yury Selivanov <yselivanov.ml at gmail.com> >>> wrote: > > [..] >>>> >>>> "ma_extra" would also make it easier for us to extend dicts >>>> in the future. >>> >>> >>> Why can't you simply use the id of the dict object as the globally unique >>> dict ID? It's already globally unique amongst all Python objects which >>> makes >>> it inherently unique amongst dicts. >>> >>> >> Brett, you need two things - the ID of the dict and the version tag. >> What we do in pypy is we have a small object (called, surprisingly, >> VersionTag()) and we use the ID of that. That way you can change the >> version id of an existing dict and have only one field. > > > > Yeah, that's essentially what I propose with ma_extra. > > Yury The trick is we use only one field :-) you're proposing to have both fields - version tag and dict id. Why not just use the id of the object (without any fields)?
- Previous message (by thread): [Python-Dev] PEP 509: Add a private version to dict
- Next message (by thread): [Python-Dev] PEP 509: Add a private version to dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list