Reaching subtrees
François Pinard
pinard at iro.umontreal.ca
Sat Sep 18 16:17:43 EDT 1999
"Tim Peters" <tim_one at email.msn.com> écrit:
> If you have, say, 2**N possible tree structures in mind [...]
We usually want to transform "interesting" trees. OK, OK... I really mean
those few we know how to transform, often a small fraction of the whole set.
Tree traversals in both directions help, of course; easy for Python.
> I suppose a hierarchical approach could be made to work quickly, though,
> like [...] But that kind of code is pretty obscure!
Agreed. Such style does not give Python much of an advantage, here.
> See section 6.3 [...] John Aycock has written [...] and astonishingly
> slow <0.9 wink>.
Thanks for the references, and for your overall help, Tim, by the way.
I'll proceed into these references while my learning continues. Hmph!
You surely meant <0.1 wink>, above? :-)
> [...] handy to unpack a structure whose form is known in advance.
> The latter is what it was designed for, of course! Trying to use it
> for more than that will probably get clumsy.
I'm cooling down :-). Nevertheless, it is fun to let some enthusiasm flow
in, while discovering Python features...
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list