From 5ae8e01cc5f7e7e85530abc59b4362c5541872a7 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 7 Nov 2002 16:55:54 +0000 Subject: [PATCH] Restore attribute access so that the following work again: dir(xrange(10)) xrange(10).__getitem__(4) --- Objects/rangeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 6c9daad5597..9d0d9cd4f27 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -190,7 +190,7 @@ PyTypeObject PyRange_Type = { 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ - 0, /* tp_getattro */ + PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */