New submission from Berker Peksag: Looks like READ_RESTRICTED, PY_WRITE_RESTRICTED and RESTRICTED flags were used for "restricted mode" [1] in Python 2. "restricted mode" has been deprecated in Python 2.3. Also, the current documentation is outdated. WRITE_RESTRICTED is now PY_WRITE_RESTRICTED: https://docs.python.org/3/extending/newtypes.html#generic-attribute-management
There are a few usages of these flags in the CPython source: PY_WRITE_RESTRICTED * Objects/funcobject.c * Objects/methodobject.c RESTRICTED * Objects/funcobject.c * Objects/classobject.c Are they still useful or can we deprecate/remove them now? [1] https://github.com/python/cpython/blob/2.7/Python/structmember.c#L180 ---------- components: Interpreter Core messages: 242134 nosy: berker.peksag priority: normal severity: normal status: open title: Outdated *_RESTRICTED flags in structmember.h type: enhancement versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24065> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com