BEGINNER: converting integer to short month name?

Robin Munn rmunn at pobox.com
Fri Apr 11 14:49:13 CEST 2003


Graham Breed <usenet at microtonal.co.uk> wrote:
> I get
> 
> Python 2.2 (#1, Dec 31 2001, 15:21:18)
> [GCC 2.95.3-5 (cygwin special)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import calendar
>>>> calendar.month_abbr[0]
> Segmentation fault (core dumped)

WHen I do that, I get the empty string ''. Note that month 0 is
undefined; if you want 'Jan', you need to do calendar.month_abbr[1].

-- 
Robin Munn <rmunn at pobox.com>
http://www.rmunn.com/
PGP key ID: 0x6AFB6838    50FF 2478 CFFB 081A 8338  54F7 845D ACFD 6AFB 6838




More information about the Python-list mailing list