Skip to content

Sequences and selectors leak child values #3

Description

@eykd

The #2 PR appears to have dredged up a bunch of problems. In mucking around with parallel I've realized that sequence and selector leak child return values:

        tree = owyl.sequence(owyl.succeed(),
                             owyl.succeed(),
                             owyl.fail(),
                             owyl.succeed())
        v = owyl.visit(tree)

        results = [x for x in v if x is not None]
        self.assertEqual(results, [True, True, False, False])

See how the succeed()/succeed()/fail() leaks out to the results? The first three results are from the sequence children, while the 4th result is the sequence itself failing.

It's been a few years since I designed this library, but I can't think for the life of me why they would do that. Do any of you using owyl depend on this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions