summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 6763f99..ef1b2bb 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1091,11 +1091,6 @@ builtin_getattr(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
v = args[0];
name = args[1];
- if (!PyUnicode_Check(name)) {
- PyErr_SetString(PyExc_TypeError,
- "getattr(): attribute name must be string");
- return NULL;
- }
if (nargs > 2) {
if (_PyObject_LookupAttr(v, name, &result) == 0) {
PyObject *dflt = args[2];
@@ -1156,11 +1151,6 @@ builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name)
{
PyObject *v;
- if (!PyUnicode_Check(name)) {
- PyErr_SetString(PyExc_TypeError,
- "hasattr(): attribute name must be string");
- return NULL;
- }
if (_PyObject_LookupAttr(obj, name, &v) < 0) {
return NULL;
}