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

Comparison w/ string throws exception #8

Open
jimrthy opened this issue Sep 29, 2015 · 0 comments
Open

Comparison w/ string throws exception #8

jimrthy opened this issue Sep 29, 2015 · 0 comments

Comments

@jimrthy
Copy link
Contributor

jimrthy commented Sep 29, 2015

d = {'a': 1, 'b': 2, 'c': 3}
i_d = ImmutableDict(d)
i_d == 'xyz'

throws a TypeError, because string indexes must be integers (and this compares them against the string keys of the dict).

This is turning up specifically when I have nested ImmutableDicts and I'm using the in operator to test for the existence of specific keys at different levels.

jimrthy added a commit to jimrthy/funktown that referenced this issue Sep 29, 2015
jimrthy added a commit to jimrthy/funktown that referenced this issue Sep 29, 2015
For issue zhemao#8: this affected both strings and arbitrary lists
zhemao pushed a commit that referenced this issue Sep 30, 2015
For issue #8: this affected both strings and arbitrary lists
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