calendar.py doesn't use lists???

Tim Peters tim.one at comcast.net
Mon Apr 22 19:41:22 EDT 2002


[Steve Holden]
> ...
> Well, reading the source gives co clue to the guilty party. We could
> find out in SourceForge if we really wanted. It wasn't me, honest.

It started as a user-contribued patch, and everyone should be relieved to
hear that we don't nominate users for Usenet abuse just because they're
trying to make everyone's lives better by contributing to Python <wink>.
IOW, I'm not telling.

> ...
> Well, let's take a look at the documentation, shall we. In "5.13
> calendar -- General calendar-related functions" for Python 2.2 there is
> no mention of these attributes. Nothing in 2.1 or 1.5.2 either. So
> offhand I'd say the author was free to replace those sequences with
> somethingbearingnodamnedresemblanceatalltolists without anyone having
> any right to complain.

Guido wouldn't say that, though, and didn't.  He was adamant that we do
whatever it took to make these undocumented thingies "act like" the old
static lists so far as was possible.  That couldn't be a complete emulation,
as the contents can change dynamically on every access (depending on locale
setting).

> ...
> There's been a lot of complaining about language change recently, but
> precious little hard evidence of real code breakage.

This was real code breakage, despite that Aaron was mucking with
undocumented interals.  We don't *want* to break stuff like that either.
But even pure bugfixes can break somebody's code, and sometimes they do.

> ...
> I have to say in this case that the code breakage you report is not
> Python's fault (though the crash and burn behavior should be fixed:
> segfaults are a bit OTT).

It turned out there's more than one cause for the crash-and-burn.  On some
platforms (not most), the crash happens in the bowels of the platform's
strftime() implementation.  So the locale change tickled platform-specific C
library bugs too.  2.2.1 also worms around those, but you really can't
change anything without breaking something for someone.

you'd-*almost*-think-programmers-would-have-learned-this-from-
    their-own-code<wink>-ly y'rs  - tim






More information about the Python-list mailing list