diff options
| author | Dan Halbert <halbert@adafruit.com> | 2020-03-21 10:59:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-21 10:59:32 -0400 |
| commit | 7e56f6eac2f02ffb0fe3d17214fdcc9738746a58 (patch) | |
| tree | 86857c14ff70e7f66aeb7053c3c85f90c303ef57 /py/runtime.c | |
| parent | 98f5cf25a5a3da98bba099a3ce375b286942bb12 (diff) | |
| parent | 9d2270a979b3d3ce107a2ea830b6bf7beecb1fdc (diff) | |
Merge pull request #2721 from jepler/cannot-assign
runtime: Improve error message when setting read-only property
Diffstat (limited to 'py/runtime.c')
| -rw-r--r-- | py/runtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c index c1c311ae4..59dcbc7a1 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1172,7 +1172,7 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) { mp_raise_AttributeError(translate("no such attribute")); } else { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError, - translate("'%s' object has no attribute '%q'"), + translate("'%s' object cannot assign attribute '%q'"), mp_obj_get_type_str(base), attr)); } } |
