A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079801.html below:

[Python-Dev] Why is type_modified() in typeobject.c not a public function?

[Python-Dev] Why is type_modified() in typeobject.c not a public function? [Python-Dev] Why is type_modified() in typeobject.c not a public function?Stefan Behnel stefan_ml at behnel.de
Tue May 27 18:47:13 CEST 2008
[reposting this to python-dev, as it affects both 2.6 and 3.0]

Hi,

when we build extension classes in Cython, we have to first build the type to
make it available to user code, and then update the type's tp_dict while we
run the class body code (PyObject_SetAttr() does not work here). In Py2.6+,
this requires invalidating the method cache after each attribute change, which
Python does internally using the type_modified() function.

Could this function get a public interface? I do not think Cython is the only
case where C code wants to modify a type after its creation, and copying the
code over seems like a hack to me.

Stefan

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4