summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-30 02:40:52 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-30 02:40:52 (GMT)
commitd82fb78b5c0a8d9bd319da360881de1f754842c1 (patch)
tree222463e0202d8948305b1ce07e4fbc45e075c96c /Objects
parented87ad876bf195b22d08eefb9328e548a30f8795 (diff)
downloadcpython-d82fb78b5c0a8d9bd319da360881de1f754842c1.zip
cpython-d82fb78b5c0a8d9bd319da360881de1f754842c1.tar.gz
cpython-d82fb78b5c0a8d9bd319da360881de1f754842c1.tar.bz2
Add values to tp_getattro and tp_flags so that dir(Ellipsis) will
return the same as dir(None).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/sliceobject.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 81517a8..42cbf24 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -24,20 +24,26 @@ ellipsis_repr(PyObject *op)
static PyTypeObject PyEllipsis_Type = {
PyObject_HEAD_INIT(&PyType_Type)
- 0,
- "ellipsis",
- 0,
- 0,
- 0, /*tp_dealloc*/ /*never called*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- (reprfunc)ellipsis_repr, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
+ 0, /* ob_size */
+ "ellipsis", /* tp_name */
+ 0, /* tp_basicsize */
+ 0, /* tp_itemsize */
+ 0, /*never called*/ /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ (reprfunc)ellipsis_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
};
PyObject _Py_EllipsisObject = {