subtyping a builtin type in a C extension

shawn google at shawndyer.com
Mon Oct 17 00:19:35 EDT 2005


I am trying to make a subtype of a string. Initially it will have no
new methods or attributes, the C equivalent of:

class myStr(str):
    pass

I have experimented a bit, but am currently making a mess of it. Does
anybody have an example they can point to of inheriting from a builtin,
or a suggestion to point me in the right direction?




More information about the Python-list mailing list