[Python-Dev] csv changed from python 2.4 to 2.5

Christian K ckkart at hoc.net
Tue Jun 26 04:47:21 CEST 2007


Hi,

I could not find documentation of the following change in python2.5. What is the
reason for that?

Python 2.4.4 (#2, Apr 12 2007, 21:03:11)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csv
>>> d=csv.get_dialect('excel')
>>> d.delimiter = ','
>>>

ck at kiste:/media/hda6/home/ck/prog/peak-o-mat/trunk$ python2.5
Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csv
>>> d=csv.get_dialect('excel')
>>> d.delimiter = ','
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: readonly attribute
>>>

the following however works:

Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csv
>>> d = csv.excel
>>> d.delimiter = ','
>>>


Christian



More information about the Python-Dev mailing list