[issue17517] StringIO() does not behave like cStringIO() when given an array object

2013-03-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, this is probably too late to fix, since it only affects 2.7. Calling StringIO / cStringIO with a non-str argument should probably have raised TypeError, for the sake of sanity. -- nosy: +pitrou resolution: -> wont fix status: open -> closed _

[issue17517] StringIO() does not behave like cStringIO() when given an array object

2013-03-21 Thread R. David Murray
R. David Murray added the comment: That is unfortunate, but I suspect it is not something that we can change, since it would be a change in behavior (StringIO.StringIO doing an str on its input) that existing code may be depending on. In Python3, StringIO doesn't accept an array as input, an

[issue17517] StringIO() does not behave like cStringIO() when given an array object

2013-03-21 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue17517] StringIO() does not behave like cStringIO() when given an array object

2013-03-21 Thread Santoso Wijaya
New submission from Santoso Wijaya: Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import array, cStringIO, StringIO >>> a = array.array('B', [1,2,3]) >>> cStringIO.StringIO(a).getvalue() '\x01\x02\x0