Aahz wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I searched
the archive but couldn't find a relevant discussion. Seems like a
glaring omission considering the batteries included philosophy,
particularly balanced binary search trees. No i
João Valverde wrote:
Aahz wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I
searched the archive but couldn't find a relevant discussion. Seems
like a glaring omission considering the batteries included
philosophy, particularly bal
João Valverde wrote:
Aahz wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I
searched the archive but couldn't find a relevant discussion. Seems
like a glaring omission considering the batteries included
philosophy, particularly bal
João Valverde wrote:
Aahz wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I
searched the archive but couldn't find a relevant discussion. Seems
like a glaring omission considering the batteries included
philosophy, particularly bal
Jason Scheirer wrote:
On Jun 25, 10:32 pm, a...@pythoncraft.com (Aahz) wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I searched
the archive but couldn't find a relevant discussion. Seems like a
glaring omission considering the batte
Stefan Behnel wrote:
João Valverde wrote:
Besides some interface glitches, like returning None
on delete if I recall correctly.
That's actually not /that/ uncommon. Operations that change an object are
not (side-effect free) functions, so it's just purity if they do not hav
João Valverde wrote:
Stefan Behnel wrote:
João Valverde wrote:
Besides some interface glitches, like returning None
on delete if I recall correctly.
That's actually not /that/ uncommon. Operations that change an object
are
not (side-effect free) functions, so it's just puri
João Valverde wrote:
João Valverde wrote:
Aahz wrote:
In article ,
Tom Reed wrote:
Why no trees in the standard library, if not as a built in? I
searched the archive but couldn't find a relevant discussion. Seems
like a glaring omission considering the batteries included
philo
Aahz wrote:
In article <006078f0$0$9721$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
Hash tables (dicts) are useful for many of the same things that trees are
useful for, but they are different data structures with different
strengths and weaknesses, and different uses. To argue that
greg wrote:
João Valverde wrote:
What's lacking is an associative array that preserves ordering,
doesn't require a hash function and has fast insertions and deletions
in O(log(n)).
Careful here -- you can't get away from the need for
hashability just by using a tree. Even if
João Valverde wrote:
greg wrote:
João Valverde wrote:
What's lacking is an associative array that preserves ordering,
doesn't require a hash function and has fast insertions and
deletions in O(log(n)).
Careful here -- you can't get away from the need for
hashability just
Aahz wrote:
In article ,
=?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote:
What's lacking is an associative array that preserves ordering, doesn't
require a hash function and has fast insertions and deletions in
O(log(n)). The particular algorithm to achieve this is a secondary
issue. It's a BST fo
João Valverde wrote:
Aahz wrote:
In article ,
=?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote:
Anyway, I'm *not* trying to discourage you, just explain some of the
roadblocks to acceptance that likely are why it hasn't already happened.
If you're serious about pushing this throug
alex23 wrote:
João Valverde wrote:
Currently I don't have a strong need for this.
And clearly neither has anyone else, hence the absence from the
stdlib. As others have pointed out, there are alternative approaches,
and plenty of recipes on ActiveState, which seem to have scra
Miles Kaufmann wrote:
João Valverde wrote:
To answer the question of what I need the BSTs for, without getting
into too many boring details it is to merge and sort IP blocklists,
that is, large datasets of ranges in the form of (IP address, IP
address, string). Originally I was also
Paul Rubin wrote:
a...@pythoncraft.com (Aahz) writes:
(In particular, WRT the bisect module, although insertion and deletion
are O(N), the constant factor for doing a simple memory move at C speed
swamps bytecode until N gets very large -- and we already have
collections.deque() for some othe
Paul Rubin wrote:
João Valverde writes:
Could you clarify what you mean by immutable? As in... not mutable? As
in without supporting insertions and deletions?
Correct.
That's has the same performance as using binary search on a sorted
list. What's the point of us
João Valverde wrote:
Paul Rubin wrote:
João Valverde writes:
Could you clarify what you mean by immutable? As in... not mutable? As
in without supporting insertions and deletions?
Correct.
That's has the same performance as using binary search on a sorted
list. What's
Paul Rubin wrote:
João Valverde writes:
Interesting, thanks. The concept is not difficult to understand but
I'm not sure it would be preferable. A copy operation should have the
same cost as a "snapshot",
You mean a deep-copy? That is unnecessarily expensive; wi
João Valverde wrote:
Paul Rubin wrote:
João Valverde writes:
Interesting, thanks. The concept is not difficult to understand but
I'm not sure it would be preferable. A copy operation should have the
same cost as a "snapshot",
You mean a deep-copy? That is unnecess
João Valverde wrote:
Paul Rubin wrote:
João Valverde writes:
Interesting, thanks. The concept is not difficult to understand but
I'm not sure it would be preferable. A copy operation should have the
same cost as a "snapshot",
You mean a deep-copy? That is unnecess
alex23 wrote:
João Valverde wrote:
Currently I don't have a strong need for this.
And clearly neither has anyone else, hence the absence from the
stdlib. As others have pointed out, there are alternative approaches,
and plenty of recipes on ActiveState, which seem to have scra
Lawrence D'Oliveiro wrote:
In message , João
Valverde wrote:
Simple example usage case: Insert string into data structure in sorted
order if it doesn't exist, else retrieve it.
the_set = set( ... )
if str in the_set :
... "retrieval&quo
kj wrote:
Does anyone know where I can buy the Python library reference in
printed form? (I'd rather not print the whole 1200+-page tome
myself.) I'm interested in both/either 2.6 and 3.0.
TIA!
kj
Why not download the documentation, take it to a local copy shop and
have it printed and bou
24 matches
Mail list logo