summaryrefslogtreecommitdiff
path: root/Objects/methodobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r--Objects/methodobject.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 862acd1f5c..4204db7ba9 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -158,11 +158,7 @@ static PyObject *
meth_get__self__(PyCFunctionObject *m, void *closure)
{
PyObject *self;
- if (PyEval_GetRestricted()) {
- PyErr_SetString(PyExc_RuntimeError,
- "method.__self__ not accessible in restricted mode");
- return NULL;
- }
+
self = m->m_self;
if (self == NULL)
self = Py_None;