Skip to content
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

Problem with isorderedsubset #32

Open
satels opened this issue Sep 15, 2021 · 1 comment
Open

Problem with isorderedsubset #32

satels opened this issue Sep 15, 2021 · 1 comment

Comments

@satels
Copy link

satels commented Sep 15, 2021

In this case:

from orderedset import OrderedSet

oset = OrderedSet([1, 2, 3])
oset2 = OrderedSet([3, 2, 1])
oset3 = OrderedSet([1, 2, 3, 4])

oset.isorderedsubset(oset3)  # True

the function is work fine.

But in this:

from orderedset import OrderedSet

oset = OrderedSet([1, 2, 3])
oset2 = OrderedSet([3, 2, 1])
oset3 = OrderedSet([7, 0, 1, 2, 3, 4])

oset.isorderedsubset(oset3)  # False

the one has wrong result.

@satels
Copy link
Author

satels commented Sep 15, 2021

I rewrite it as I wish to:

list(oset2 & oset3) == list(oset2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant