[Python-Dev] {}.first[key,value,item] and {}.pop (was Re: {}.getitem())

Michael Hudson mwh21@cam.ac.uk
Thu, 30 Nov 2000 15:35:31 +0000 (GMT)

On Thu, 30 Nov 2000, Greg Wilson wrote:

> > Barry Warsaw wrote:
> > {}.pop() sounds like the right thing given its symmetry with [].pop().
> > [details]
> Should we then add dict.push(), which would add a key/value pair to the
> dictionary?  I realize it's redundant (same effect as 'dict[x] = y'),
> but I think anyone who's gone through a CS course in data structures
> and algorithms will expect push() where there's pop(), and it will allow
> functions to be polymorphic over lists and dicts.

'cept there's no list.push - and I don't think you're proposing spelling
"dict.push" "dict.append", are you?