]> granicus.if.org Git - python/commitdiff
Restore attribute access so that the following work again:
authorRaymond Hettinger <python@rcn.com>
Thu, 7 Nov 2002 16:55:54 +0000 (16:55 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 7 Nov 2002 16:55:54 +0000 (16:55 +0000)
   dir(xrange(10))
   xrange(10).__getitem__(4)

Objects/rangeobject.c

index 6c9daad5597a493f0fe0d1ca939f946a726aa992..9d0d9cd4f278fa9527286e4df329eb6218460577 100644 (file)
@@ -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 */