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

Some operations fail for lists and strings #104

Open
sim1234 opened this issue May 20, 2022 · 0 comments
Open

Some operations fail for lists and strings #104

sim1234 opened this issue May 20, 2022 · 0 comments

Comments

@sim1234
Copy link

sim1234 commented May 20, 2022

Both
parse("c").update(["c"], 2)
parse("c").filter(lambda a: True, ["c"])

fail with

TypeError: list indices must be integers or slices, not str

I think it should do nothing instead because that patch does not make sense in context of that data.

Similar case with
parse("c").update("c", 2)
parse("c").filter(lambda a: True, "c")

but they fail with

TypeError: 'str' object does not support item assignment

and

TypeError: string indices must be integers

respectively.

@sim1234 sim1234 changed the title Some operations fail for lists Some operations fail for lists and strings May 20, 2022
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