On Tuesday, August 8, 2023 at 10:27:14 AM UTC-5 Edward K. Ream wrote:

>  c.all_positions_for_v shows how to generate all *positions* p such that 
p.v == v. 

This method "reconstitutes" positions using only VNode operations. But this 
trick is only mildly interesting.

Instead, the following straightforward generator yields positions in 
outline order:

def all_positions_for_v(self, v: VNode) -> Generator:
    c = self
    for p in c.all_positions():
        if p.v == v:
            yield p.copy()

Afaik no part of Leo uses this code. Perhaps the PR should delete it.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/22c31012-ca05-4b83-9efc-5468133103c4n%40googlegroups.com.

Reply via email to