mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
This commit is contained in:
parent
d84da1b67a
commit
42dae6a89b
5 changed files with 9 additions and 9 deletions
|
@ -400,7 +400,7 @@ And more, added later.
|
|||
>>> i.gi_running = 42
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: readonly attribute
|
||||
AttributeError: readonly attribute
|
||||
>>> def g():
|
||||
... yield me.gi_running
|
||||
>>> me = g()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue