survey: is shelve broken? should it be fixed?

Roman Suzi rnd at onego.ru
Tue May 7 10:15:11 EDT 2002


On Tue, 7 May 2002, Alex Martelli wrote:

> Martin v. LЖwis wrote:
> 
> > Roman Suzi <rnd at onego.ru> writes:
> > 
> >> I think it is better to fix and not looking for backward compatibility!
> >> It will not be seen on the background of other major changes to Python.
> >> So, no smart is needed, IMHO.
> > 
> > I disagree. The past tells us that great care is needed for backwards
> > compatibility.
> 
> Right.  We really cannot afford to change semantics wantonly, even though
> it may seem the old one was 'broken', it WAS around for years, so clearly
> some applications might well have relied on it.

Are there really applications (but very simple) which survive 1.5.2 -> 2.x
leap? In my experience always some little modification is needed to bring
them up-to-date with current python version.

For example, I have a small module which generate HTML (ala HTMLGen) and
when I tried it with python2.1 I got an error: __repr__ method now must
return string... I changed that to .repr and `-s to .repr calls and it
works again. Probably, I have not read the docs when I wrote that module,
but it is certainly incompatibility. One of the pits which my program 
get into.

So, do we really need to support bad behaviour or cut it at the point when
it was noticed? I do not believe it will break many programs. Most
probably, it will heal some of them. Maybe instead of adding 'smart' it is
better to raise Warnings? I can't see reasons to preserve erroneous
behaviour for the sake of compatibility.

Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 






More information about the Python-list mailing list