why isn't python more popular?

Tim Peters tim_one at email.msn.com
Fri Aug 18 16:06:09 EDT 2000


[Andrew Kuchling]
> Actually there are a few backward-incompatible changes, listed in
> the 2.0 article:

Heh -- you apparently haven't sat on a stds committee <wink>.  Reliance on
undefined (and/or deprecated) behavior is a "use at your own risk" thing.
"backward incompatible" is generally reserved for changes in *advertised*
semantics.

> 	* str( <long> ) no longer appends an 'L'

That's backward incompatible, in the legalistic sense above.  And indeed, I
happen to have used str(long) a lot, and had to change a lot of code to
recover from this one.  All the rest in this list didn't bite me at all.

> 	* list.append( 1,2 ) now raises a TypeError exception

That this "worked" wasn't documented (or intended -- it was an old bug in
the CPython implementation).  Scant comfort to those who don't read the
docs, but you're in the same boat with every other language on Earth  -- the
docs are the only contract you've got, and ignoring them is perilous.

> 	* repr( <float> ) uses a different precision from str()

The result of repr(float) was (and remains) implementation-defined.

> 	* the -X switch is gone, so the standard exceptions are
>       always classes

-X was introduced in 1.5a4 as a temporary backward compatibility hack;
people have had years to adjust to this.

> 	* You can now use longs for multiplying sequences and slicing
>       them, which might conceivably possibly stand a chance of
>       breaking something.

This is troublesome in theory, but mostly because which exceptions may get
raised and by what has been left almost entirely undocumented.  The docs
neither promise that new exceptions won't get raised, nor that old ones will
continue to be raised.  In that sense, the behavior of virtually *any*
Python program is implementation-defined.  Best advice in cases like that is
"don't worry, be happy" <wink>.


Your list is very useful, BTW!  Don't mean to knock it.  I'm trying again
(as in my original msg) to counter implications that Python users are about
to suffer massive and/or gratuitous code breakage, or that Guido has
undergone a personality transplant and no longer cares about compatibility.
2.0's list of potential gotchas is longer than in previous releases mostly
because it's been such a long time since 1.5.2 was released.

corporate-apologist-and-proud-of-it-ly y'rs  - tim






More information about the Python-list mailing list