calendar.py doesn't use lists???

Aaron Watters aaron at reportlab.com
Mon Apr 22 18:05:16 EDT 2002


Hi guys.  I got an irksome problem.  It's possible that
it's fixed in python 2.2.1, but even if it is, it irks me.

I tried the following script:

"""
import sys
print sys.version
if 1:
    from calendar import month_abbr, month_name
    # hey python guys, i want lists!!
    for x in (month_abbr, month_name):
        print type(x)
    month_abbr = list(month_abbr)
    month_name = list(month_name)
    print month_abbr
    print month_name
"""

Using python 2.1 I get this output

"""
2.1.1 (#20, Jul 26 2001, 11:38:51) [MSC 32 bit (Intel)]
<type 'list'>
<type 'list'>
['   ', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'N
ov', 'Dec']
['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', '
September', 'October', 'November', 'December']
"""

(completing normally)

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?

Irked.  In general I've noticed a tendancy with recent python
releases towards changing stuff for the fun of changing stuff,
I'm sorry to say.  Please remember that when you fix something
that isn't broken, you might just be breaking somebody else's code.

Sorry to whine.

   -- Aaron Watters

===
If there is a god, he or she sure liked to design
beetles.
  -- attribution forgotten



More information about the Python-list mailing list