Issue1439

classification
Title: Can't write() array.array
Type: behaviour Severity: major
Components: Library Versions: 2.5.0
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, pjdm
Priority: Keywords:

Created on 2009-08-16.10:02:03 by pjdm, last changed 2009-08-16.15:02:30 by fwierzbicki.

Messages
msg5041 (view) Author: Peter Mayne (pjdm) Date: 2009-08-16.10:02:02
This program writes an array.array to a file.

import array
import sys

a = array.array('c', 'thebishop\n')
f = open('/tmp/out.txt', 'wb')
f.write(a)
f.close()

This works using CPython 2.5.4. Jython 2.5.0 results in

Traceback (most recent call last):
  File "writearray.py", line 7, in <module>
    f.write(a)
TypeError: write requires a string as its argument
msg5045 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-08-16.14:33:10
Fixed in r6678
History
Date User Action Args
2009-08-16 15:02:30fwierzbickisetstatus: open -> closed
resolution: accepted -> fixed
2009-08-16 14:33:10fwierzbickisetmessages: + msg5045
2009-08-16 13:15:18fwierzbickisetassignee: fwierzbicki
resolution: accepted
nosy: + fwierzbicki
2009-08-16 10:02:03pjdmcreate