How to make a C extension module backwards compatible?

Martin v. Loewis martin at v.loewis.de
Wed Sep 18 00:47:43 EDT 2002


Andrew McNamara <andrewm at object-craft.com.au> writes:

> Is there any community wisdom on how to make a C extension module that
> implements a new-style class (type?) backwards compatible (albeit,
> at the cost of some functionality)?
> 
> Put another way, how *should* I make a class implemented in C behave
> like a new-style class when installed with python 2.2 and above, and
> like an old style class when installed with older pythons?

What properties of a new-style class are you interested in? If you
implement a plain type, it will work on all Python versions, no need
to change anything for Python 2.2.

Regards,
Martin




More information about the Python-list mailing list