Which Python version to code for?

Paul Boddie paul at boddie.net
Thu Jul 19 04:41:36 EDT 2001


"Peter Milliken" <peter.milliken at gtech.com> wrote in message news:<9j50q4$a3f9 at news1.gtech.com>...
>
> "Charles Crain" <chuxxx at swbell.net> wrote in message
> news:tlbbqas5b6hvff at corp.supernews.com...
> >
> > It occurs to us that this is a general question facing anyone wishing to
> > release a Python product.  Do you code for the latest and greatest, or do
> > you try to figure out what release is most "common" (in this case, still
> > 1.5.2, since it ships with most major Linux distros) and code for that?
>
> In my opinion (for what it is worth :-)), 1.5.2 seemed to be a very popular
> and stable release, so unless 2.X brought in some feature that you feel you
> *really* can't do without, then 1.5.2 would be a pretty reasonable baseline
> to use.

This seems like sensible advice. Python 1.5.2 was very popular, stable
and widely distributed, but if you must use a later release, I would
think that Python 2.0(.1) is the one to support, given that some
significant and useful features were introduced for that release:
Unicode support being a notable example.

Other things you might like in 2.x, but which involve syntactic
incompatibilities with 1.5.2, include the augmented assignment
constructs. Personally, I wouldn't recommend breaking compatibility
with 1.5.2 through the use of such constructs unless they give you the
means to achieve significant performance improvements which can't
reasonably be achieved any other way.

I think it's sensible to suggest that the simpler the module
dependencies of your application, the less justifiable it is to insist
on the latest and greatest Python release. If you only use standard
modules which exist in acceptable forms for 1.5.2, potential users
will be dissatisfied if you want them to upgrade to 2.1 (for example)
purely because you've used some feature of that release more as a
luxury than as a necessity.

Paul



More information about the Python-list mailing list