Skip to content

Error in take_last_while when last item in list fails predicate #33

@kod-kristoff

Description

@kod-kristoff

When calling
** Expected behaviour **

xs = [(-1, '23456789')]
post = take_last_while(lambda i: i[0] == 0, xs)
assert post == []

** Current behaviour **

xs = [(-1, '23456789')]
post = take_last_while(lambda i: i[0] == 0, xs)
assert post == [(-1, '23456789')]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions