Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Subclassing types in C

Reply
Thread Tools

Subclassing types in C

 
 
William Studenmund
Guest
Posts: n/a
 
      05-16-2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I used the embedding python guide to embed python in an application
to let me easily script the app. It's all working rather well, and
I've added a number of types which expose the internals to python.

However I've gotten to the point where I want to add classes for part
of the interface, and these class really should be subclasses of
another one of my types. Well, subtypes. The Embedding guide doesn't
cover this.

I found PEP 253, which partially covers this. It indicates that I
should be able to do this. However: 1) the "Creating a subtype of a
built-in type in C" section has an "XXX there should be a paragraph
or two about argument passing here" comment, and 2) the PEP's
abstract has an editor's note indicating that the PEP no longer
describes the implementation.

So what do I need to do? Are the instructions in the PEP still correct?

Take care,

Bill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEahdIDJT2Egh26K0RAuJIAJ406DDdXTu6VEfcW1yWa2 Hg4wIIQACfVuCH
SBrwJOCqHIHZdFndfzJBMbo=
=aPMN
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
subclassing pyrex extension types in python Nitin Python 1 01-28-2007 06:58 AM
Style guide for subclassing built-in types? Jane Austine Python 12 02-24-2005 10:00 AM
subclassing builtin types =?ISO-8859-1?Q?BJ=F6rn_Lindqvist?= Python 2 10-08-2004 07:39 AM
Subclassing built-in types Emiliano Molina Python 3 08-26-2004 10:32 PM
subclassing built-in types Gabriel Cooper Python 0 05-24-2004 09:08 PM



Advertisments