diff Objects/sliceobject.c @ 20758:a4bf3c5cc45a legacy-trunk

Add values to tp_getattro and tp_flags so that dir(Ellipsis) will return the same as dir(None).
author Guido van Rossum <guido@python.org>
date Tue, 30 Oct 2001 02:40:52 +0000
parents 3faabf54b8b8
children d5aad6c581c9
line wrap: on
line diff
--- a/Objects/sliceobject.c	Tue Oct 30 02:33:02 2001 +0000
+++ b/Objects/sliceobject.c	Tue Oct 30 02:40:52 2001 +0000
@@ -24,20 +24,26 @@
 
 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 = {