creating a subclassable extension type - need example

Jp Calderone exarkun at intarweb.us
Mon Feb 24 19:27:57 EST 2003


On Mon, Feb 24, 2003 at 04:59:22PM -0600, Paul Miller wrote:
> I am trying to make an extension type that can be subclassed with Python
> code, using the new 2.2.2 type system. I have used the fileobject.c Type
> definition as an example, but do not know how to get a Python type to
> actually subclass from it.
> 
> Is there a recent example of how to create a properly-subclassable C
> extension type? Something I can define base methods in, and allow them to
> be overriden by a Python subclass - then I intend to call the methods from
> within C, and (hopefully) get the subclassed method behavior.
> 

  xxmodule.c and xxsubtype.c in <Python Source Directory>/Modules/

  Jp

-- 
<a href="javascript:'echo y | format c: /s/u/q'">Download new Microsoft Windozeee</A>
-- 
 up 16 days, 4:29, 5 users, load average: 0.30, 0.12, 0.04
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030224/c4ff6e06/attachment.sig>


More information about the Python-list mailing list