GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Obtaining short file path
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [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

  • Previous message: [Python-Dev] Obtaining short file path
  • Next message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

[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


  • Previous message: [Python-Dev] Obtaining short file path
  • Next message: [Python-Dev] Why is type_modified() in typeobject.c not a public function?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.