calendar.py doesn't use lists???

Fernando Pérez fperez528 at yahoo.com
Mon Apr 22 18:17:24 EDT 2002


Aaron Watters wrote:

> 
> Using Python 2.2 I get this
> 
> """
> 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)]
> <type 'instance'>
> <type 'instance'>
> [CRASH AND BURN... WINDOWS XP SUGGESTS I SEND A COMPLAINT TO MICROSOFT...]
> """
> 
> Of course it may be that this is fixed in python 2.2.1 but...
> 
> WHO'S GOOFY IDEA WAS THIS?
> 
> Seriously, why did you need to change these sequences from
> lists where they worked with my code, to somethingsimilartolists
> that broke my code?

I get the feeling that this isn't so much a change which broke your code but 
rather a good'ole BUG. Under Mandrake Linux 8.2:

[~]> ipy
Python 2.2 (#1, Feb 24 2002, 16:21:58)
Type "copyright", "credits" or "license" for more information.

IPython 0.2.10pre9 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
?object -> Details about 'object'; object? also works, ?? prints more.
help    -> Python's own help system.
@magic  -> Information about IPython's 'magic' @ functions.

In [1]: from calendar import month_abbr, month_name

In [2]: month_abbr ?
Type:           instance
Base Class:     calendar._localized_name
String Form:    <calendar._localized_name instance at 0x81a8cb4>
Namespace:      Interactive

In [3]: for m in month_abbr: print m
   ...:
Segmentation fault

Python shouldn't segfault ever, period (that is, unless it's calling your own 
extension modules and those are causing the segfault).

Cheers,

f.



More information about the Python-list mailing list