[Python-Dev] Counter proposal: multidict (was: Proposal: defaultdict)

2006-02-17 Thread Ian Bicking
I really don't like that defaultdict (or a dict extension) means that x[not_found] will have noticeable side effects. This all seems to be a roundabout way to address one important use case of a dictionary with multiple values for each key, and in the process breaking an important quality of

Re: [Python-Dev] Counter proposal: multidict (was: Proposal: defaultdict)

2006-02-17 Thread Guido van Rossum
On 2/17/06, Ian Bicking [EMAIL PROTECTED] wrote: I really don't like that defaultdict (or a dict extension) means that x[not_found] will have noticeable side effects. This all seems to be a roundabout way to address one important use case of a dictionary with multiple values for each key, and

Re: [Python-Dev] Counter proposal: multidict (was: Proposal: defaultdict)

2006-02-17 Thread Fred L. Drake, Jr.
On Friday 17 February 2006 14:51, Ian Bicking wrote: This all seems to be a roundabout way to address one important use case of a dictionary with multiple values for each key, I think there are use cases that do not involve multiple values per key. That is one place where this commonly

Re: [Python-Dev] Counter proposal: multidict (was: Proposal: defaultdict)

2006-02-17 Thread Jack Diederich
On Fri, Feb 17, 2006 at 03:03:06PM -0500, Fred L. Drake, Jr. wrote: On Friday 17 February 2006 14:51, Ian Bicking wrote: and in the process breaking an important quality of good Python code, that attribute and getitem access not have noticeable side effects. I'm not sure that's quite