Need a metavalue singleton kinda thingy as a reserved key...
tjreedy at udel.edu
Sun Aug 11 16:39:22 CEST 2002
"Noah" <noah at noah.org> wrote in message
news:c9d82136.0208102231.38d60beb at posting.google.com...
> I have a class where you can add values to a dictionary.
> I want to have a special meta key that I can use to reserve a spot
> in the dictionary.
> Perhaps I don't understand what I'm thinking. Am I thinking about
I can see reserving spots in an array, like reserving a place in line
or a seat in a theatre, but dicts don't have spots to reserve --
unless you consider keys to be spots. In the latter case, you would
want to do something like dic[key] = RESERVED rather than
dic[RESERVED] = whatever.
Terry J. Reedy
More information about the Python-list