Subclassing types in C

Discussion in 'Python' started by William Studenmund, May 16, 2006.

  1. -----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)

    iD8DBQFEahdIDJT2Egh26K0RAuJIAJ406DDdXTu6VEfcW1yWa2Hg4wIIQACfVuCH
    SBrwJOCqHIHZdFndfzJBMbo=
    =aPMN
    -----END PGP SIGNATURE-----
     
    William Studenmund, May 16, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabriel Cooper

    subclassing built-in types

    Gabriel Cooper, May 24, 2004, in forum: Python
    Replies:
    0
    Views:
    299
    Gabriel Cooper
    May 24, 2004
  2. Emiliano Molina

    Subclassing built-in types

    Emiliano Molina, Aug 25, 2004, in forum: Python
    Replies:
    3
    Views:
    311
    Emiliano Molina
    Aug 26, 2004
  3. =?ISO-8859-1?Q?BJ=F6rn_Lindqvist?=

    subclassing builtin types

    =?ISO-8859-1?Q?BJ=F6rn_Lindqvist?=, Oct 8, 2004, in forum: Python
    Replies:
    2
    Views:
    3,494
    Alex Martelli
    Oct 8, 2004
  4. Jane Austine
    Replies:
    12
    Views:
    455
    Nick Coghlan
    Feb 24, 2005
  5. Nitin
    Replies:
    1
    Views:
    301
Loading...

Share This Page