diff options
author | Guido van Rossum <guido@python.org> | 2003-02-18 17:18:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-18 17:18:35 (GMT) |
commit | 6b29c0147b964e6afa6a09bb8d694bafc30cf7ad (patch) | |
tree | 7a387fb4bb9aa37f4e73f7cd53cc1fa0a8b79d4b /Objects/funcobject.c | |
parent | ff71c98449c7fd2499d51474dbf690eb7f98dabf (diff) | |
download | cpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.zip cpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.tar.gz cpython-6b29c0147b964e6afa6a09bb8d694bafc30cf7ad.tar.bz2 |
Make __module__ writable except in restricted mode (like for classic classes).
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index fa24131..6f0fa26 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -159,7 +159,7 @@ static PyMemberDef func_memberlist[] = { RESTRICTED|READONLY}, {"func_name", T_OBJECT, OFF(func_name), READONLY}, {"__name__", T_OBJECT, OFF(func_name), READONLY}, - {"__module__", T_OBJECT, OFF(func_module)}, + {"__module__", T_OBJECT, OFF(func_module), WRITE_RESTRICTED}, {NULL} /* Sentinel */ }; |