begging for a tree implementation

Diez B. Roggisch deets at nospam.web.de
Thu Apr 27 05:28:14 EDT 2006


> 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 simple class like yours - which
I needed yesterday and wrote in 2 minutes. And that is tailored to the
needs at hand and not some abstraction that might prevent you from e.g.
using methods like __iter__ or the like with your own semantics.

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... :)

Diez



More information about the Python-list mailing list