Python Gotcha's?

rusi rustompmody at gmail.com
Mon Apr 16 03:21:16 EDT 2012


On Apr 16, 11:44 am, Bryan <bryanjugglercryptograp... at yahoo.com>
wrote:
> Steven D'Aprano wrote:
> > And how is that different from any other two versions of Python?
>
> Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever
> *intentionally backwards incompatible* Python release. --GVR
>
> > Unless both versions include the same libraries (either standard modules
> > or third party), and your code is written to use only the lowest common
> > denominator functionality, you will have problems regardless of which
> > versions they are.
>
> *My* code is not what's holding me back. I *like* moving my code to
> Python 3. What's holding me back is library availability, and from
> various readings on the transition to 3, I gather that's what holding
> many, perhaps most, users back.
>
> The need to keep using 2.x should not stop users from installing and
> starting to muck with 3.0. That's much more painful than it has to be
> because they both use the same file extension.

There are two kinds of languages
1. The supercalifragilisticexpialidocious language that exists
entirely on my own computer (and perhaps a small band of devotees)
(for some value of 'my'). IOW a 'research' language
2. Those that just exist like the sun, moon and taxes (Fortran, Cobol
and C come to mind)
If the ISO-C committee decided that garbage collection should exist in
C, they can legislate it with comparable ease to legislating a change
in the sun's gravitation.

The problem with python is that it sits in between.  It is still
alive, growing, learning etc and yet the installed base is so big that
incompatibilities cause real trouble.

Speaking more quantitatively: we can work out the cost/benefit ratio.

Assume that all the changes in py3k are 'good', they are benefits -- b
Costs can be single-cased (s) -- basically those that can be handled
by a 2to3 module
Those that are not so handle-able are the sorry case (multicase m)

And so the cost/benefit ratio is (s + n*m)/b (n is the no of python
users/uses 'out there')
IOW the irony: the success of python (large n) implies the failure of
py3k.

Of course not so ironic if one considers that Fortran, Cobol, C cant
be changed precisely because they are so successful



More information about the Python-list mailing list