[Python-Dev] Optimization of the Year (original) (raw)

Hye-Shik Chang perky at i18n.org
Tue Feb 10 12:54:24 EST 2004


On Tue, Feb 10, 2004 at 06:25:18PM +0100, Anders J. Munch wrote:

From: "Guido van Rossum" <guido at python.org> > > If in 3rd party code, that code is simply wrong. > > If indeed such 3rd party code exists, and we expect we can't get it > all fixed before 2.4 is released, the trackeditem hack can be used as > a temporary measure to hunt down all those 3rd party extensions that > break the abstraction. I propose to issue a warning when it is > discovered that obitem != trackeditem. Then in 2.5 we can remove > the trackeditem feature.

There is a simpler way to make sure all clients that illicitly use obitem are updated appropriately: Break the build by renaming. If obitem is renamed to obitems or obitem2 or whatever, any code that uses the old name will cease to compile.

Something like this?

typedef struct { PyObject_VAR_HEAD #ifdef Py_BUILD_CORE PyObject **ob_item; #else PyObject **__ob_item; #endif };

Hye-Shik



More information about the Python-Dev mailing list