Skip to content
This repository has been archived by the owner. It is now read-only.

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

merged 1 commit into from Aug 2, 2018


Copy link

@patiences patiences 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

@freakboy3742 freakboy3742 left a comment


@freakboy3742 freakboy3742 merged commit d26e35d into beeware:master Aug 2, 2018
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants