"Duncan Booth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Subclassing doesn't have to imply a common implementation, just a common
| interface.
True, but in Python, subclassing is usually done to reuse implementation.
Interface subclassing is usually from a common abstract ba
"Hamilton, William " <[EMAIL PROTECTED]> wrote:
>> From: thebjorn
>> What's stabledict? I'm assuming that ordereddict is a mapping that
>> maintains insertion order(?)
>
> Yes, ordereddict is a dict that maintains insertion order. Stabledict
> is probably a dict that maintains _an_ order, so tha
> From: thebjorn
> What's stabledict? I'm assuming that ordereddict is a mapping that
> maintains insertion order(?)
Yes, ordereddict is a dict that maintains insertion order. Stabledict
is probably a dict that maintains _an_ order, so that repr() and the
like return the same value when used on d
On Sep 29, 7:13 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
[...]
> Right now I think there are probably three dict variants needed: sorteddict
> (still waiting for a convincing use case), ordereddict (lots of use cases),
> and this one: stabledict.
What's stabledict? I'm assuming that ordereddict
thebjorn <[EMAIL PROTECTED]> wrote:
> On Sep 29, 4:23 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> [...]
>> Another example would be if you had a library which serialised a
>> dictionary to xml. There is nothing wrong with the library if it
>> doesn't care about order, but if you have some other
On Sep 29, 4:23 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
[...]
> Another example would be if you had a library which serialised a dictionary
> to xml. There is nothing wrong with the library if it doesn't care about
> order, but if you have some other reason why you want the xml to be stable
> (
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-09-27, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>> Is this a practical use case? When are sequential visits of all
>> elements in order frequently suspended to make insertions and
>> deletions, with a need for efficient lookup by key?
>
>
On 2007-09-27, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Is this a practical use case? When are sequential visits of all
> elements in order frequently suspended to make insertions and
> deletions, with a need for efficient lookup by key?
Does it need to be a sequential visit of *all* elemen
I don't see a focused discussion of computational complexity of a
sorted dict; its API cannot be simpler than sorting a dictionary and
it has issues and complications that have already been discussed
without completely satisfactory solutions, so the only possible reason
to adopt a sorted dict is th
On 26 Sep, 18:59, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> [Mark Summerfield]
>
> > Below is a PEP proposal for a sorteddict. It arises out of a
> > discussion on this list that began a few weeks ago with the subject of
> > "An ordered dictionary for the Python library?"
>
> It is worth remem
10 matches
Mail list logo