By the way, I've just looked at g.findGnx it uses c.all_unique_positions to visit all positions (skipping sub-trees of clones) and checking if the gnx matches. There is much faster way to generate all positions having same vnode. It is called c.all_positions_for_v(v).
# to find a position of a v-node with the given gnx # all you really need to do is v = c.fileCommands.gnxDict[gnx] p = next(c.all_positions_for_v(v)) This is a generator and it visits all parents, grand parents, grand grand parents, ... and their direct children (complexity O(log n)), not all unique positions in the outline (which would have complexity of O(n)). On Thursday, July 20, 2023 at 6:43:54 PM UTC+2 Edward K. Ream wrote: > On Thu, Jul 20, 2023 at 9:21 AM Thomas Passin <tbp1...@gmail.com> wrote: > >> I'm inclined to agree. >> > > Functions do what they do, regardless of their names or docstrings :-) > > If you want to know what they are guaranteed to do, look at their unit > tests. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/9a054a04-b72b-4acd-8837-8ecceed7c789n%40googlegroups.com.