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

Fix error messages for calling __setitem__ on an immutable type #884

merged 1 commit into from Aug 2, 2018


None yet
2 participants
Copy link

commented Jul 31, 2018

For example,

x = "abc"
x[0] = "d"

should result in a TypeError: 'str' object does not support item assignment. Currently it incorrectly throws an AttributeError. The proper behavior is already implemented in org/python/types/ and org/python/types/ (in the form of an overrided __setitem__ method that throws the right TypeError), hence why there are only tests and no code for those files.

Copy link

left a comment


@freakboy3742 freakboy3742 merged commit d26e35d into beeware:master Aug 2, 2018

5 checks passed

beekeeper:0/beefore:javacheckstyle Java lint checks passed.
beekeeper:0/beefore:pycodestyle Python lint checks passed.
beekeeper:1/smoke-test Smoke build (Python 3.4) passed.
beekeeper:2/full-test:py3.5 Python 3.5 tests passed.
beekeeper:2/full-test:py3.6 Python 3.6 tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.