Re: begging for a tree implementation

2006-04-27 Thread Sybren Stuvel
Micah enlightened us with: I'm looking for a simple abstract-data-type tree. I would have thought there would be a built-in type, but I can't find one. I just need to be able to start from a root node and attach children from there. I could jury-rig one using a dict or some tuples, but I'd

Re: begging for a tree implementation

2006-04-27 Thread Rene Pijlman
Micah: I'd like a full-featured tree What features? -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: begging for a tree implementation

2006-04-27 Thread Ant
Did you not read the first post? All the nice methods would be appreciated (getLeaves, isLeaf, isRoot, depthfirst, breadthfirst,...) -- http://mail.python.org/mailman/listinfo/python-list

Re: begging for a tree implementation

2006-04-27 Thread Ant
I was looking for a tree implementation a while back, but got no real pointers. Seems that there are no tree data model modules out there - which surprises me, since it is such a fundamental data structure. I ended up using a very basic tree data class - I didn't need all of the methods you

Re: begging for a tree implementation

2006-04-27 Thread Diez B. Roggisch
I may start a tree data structure project - it's something I've been thinking about for a while, and now it's clear that it's not just me who uses trees as data structures! Oh, people do use them. It's just to easy to cough one up when you need it - either as nested tuples, lists, dicts or a

Re: begging for a tree implementation

2006-04-27 Thread Fredrik Lundh
Diez B. Roggisch wrote: This is not to discourage you - just don't expect people to greet you as the next messiah who finally brought one of CS most fundamental data structures to Python... :) xml.etree was added to Python 2.5 before christmas :-) /F --

Re: begging for a tree implementation

2006-04-27 Thread Ant
Damn! Missed the boat ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: begging for a tree implementation

2006-04-27 Thread Diez B. Roggisch
Fredrik Lundh wrote: Diez B. Roggisch wrote: This is not to discourage you - just don't expect people to greet you as the next messiah who finally brought one of CS most fundamental data structures to Python... :) xml.etree was added to Python 2.5 before christmas :-) Can't wait until

Re: begging for a tree implementation

2006-04-27 Thread DogWalker
Micah wrote: I'm looking for a simple tree implementation: 0-n children, 1 root. All the nice methods would be appreciated (getLeaves, isLeaf, isRoot, depthfirst, breadthfirst,...) That's really all I need. I could code one up, but it would take time to debug, and i'm really short on time

Re: begging for a tree implementation

2006-04-26 Thread Sybren Stuvel
Micah enlightened us with: I'm looking for a simple tree implementation: 0-n children, 1 root. All the nice methods would be appreciated (getLeaves, isLeaf, isRoot, depthfirst, breadthfirst,...) That's really all I need. I could code one up, but it would take time to debug, and i'm really

Re: begging for a tree implementation

2006-04-26 Thread Micah
Sybren Stuvel wrote: Micah enlightened us with: I'm looking for a simple tree implementation: 0-n children, 1 root. All the nice methods would be appreciated (getLeaves, isLeaf, isRoot, depthfirst, breadthfirst,...) That's really all I need. I could code one up, but it would take time