[Python-Dev] Who approved PyObject_GenericGetIter()??? (original) (raw)
Guido van Rossum guido@python.org
Mon, 17 Mar 2003 07:26:24 -0500
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Modules _hotshot.c,1.32,1.33 arraymodule.c,2.84,2.85 xreadlinesmodule.c,1.13,1.14
- Next message: [Python-Dev] PyObject_GenericGetIter()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Modified Files: object.c Log Message: Created PyObjectGenericGetIter(). Factors out the common case of returning self.
Index: object.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v retrieving revision 2.199 retrieving revision 2.200 diff -C2 -d -r2.199 -r2.200 *** object.c 19 Feb 2003 03:19:29 -0000 2.199 --- object.c 17 Mar 2003 08:22:56 -0000 2.200 *************** *** 1302,1305 **** --- 1302,1312 ---- PyObject * + PyObjectGenericGetIter(PyObject *obj) + { + PyINCREF(obj); + return obj; + } + + PyObject * PyObjectGenericGetAttr(PyObject *obj, PyObject *name) {
Huh? Where was this agreed upon? iter returning self doesn't sound very generic to me, so at the very least the name should be changed IMO. Also, adding a standard API for a helper function this trivial doesn't really make sense to me.
So maybe I'm missing something. Please explain.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Modules _hotshot.c,1.32,1.33 arraymodule.c,2.84,2.85 xreadlinesmodule.c,1.13,1.14
- Next message: [Python-Dev] PyObject_GenericGetIter()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]