-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preorder traversal sequence on descendants #38
Comments
OK—how do you think the interface should look? A) We add a new I think A) might be very difficult to apply generically (like, how would it work with ancestors?), so I'm leaning towards B). For reference, there's http://en.wikipedia.org/wiki/Tree_traversal#Pre-order |
FWIW, preorder is exactly what this user is asking for over email:
|
This is implemented in 3.8.0 as |
Does a |
@leonelgalan: Interesting, I'll think about it—it should be doable. |
@leonelgalan — just released 3.10.0, which has this new class method, roots_and_descendants_preordered. The README was updated as well. Thanks for the suggestion! |
I believe this can be a very particular feature, but do you have any thoughts on making
tag.descendants
return its results with a preorder sequence? What would you recommend?The text was updated successfully, but these errors were encountered: