[Python-Dev] 2.1c1 "make test" failures on SGI Irix

Guido van Rossum guido@digicool.com
Mon, 16 Apr 2001 12:07:36 -0500


> Yes, the SGI appears not to return a grouping ([3, 0] is expected) for
> the en_US locale (the rest of it looks OK).
> 
> However, there is still a bug in Lib/locale.py - the code currently
> tries to allow for the possibility that an empty grouping may be
> returned from localeconv() (and there must be some locales where this is
> correct):
> 
> def _group(s):
>     conv=localeconv()
>     grouping=conv['grouping']
>     if not grouping:return s
> 
> The code calling _group() assumes that the object returned will always
> be a tuple, and hence the above will cause a traceback when localeconv()
> returns an empty grouping. The correct code should be:
> 
> def _group(s):
>     conv=localeconv()
>     grouping=conv['grouping']
>     if not grouping:return (s, 0)
> 
> test_locale will still fail on the SGI, but now because of a bug in the
> platform implementation of the en_US locale, rather than a bug in the
> Python locale.py code. It's better than a traceback.

Thanks.  I've checked this in now.

> BTW, mail to Martin doesn't seem to be getting through.

I think it's his home machine, and I suspect he's taken a long weekend
off (Monday after Easter is a holiday in most European countries).

--Guido van Rossum (home page: http://www.python.org/~guido/)