Message89104
The included patch makes type checking of the arguments of StringIO
consistent between pyio and io.
>>> import io
>>> io.StringIO(b"hello")
Traceback (most recent call last):
...
ValueError: initial_value must be str or None, not bytes
>>> io.StringIO(newline=b"\n")
<_io.StringIO object at 0x7f93d52953d0>
>>> import _pyio as pyio
>>> pyio.StringIO(newline=b"\n")
Traceback (most recent call last):
...
TypeError: illegal newline type: <class 'bytes'>
>>> io.StringIO([])
Traceback (most recent call last):
...
ValueError: initial_value must be str or None, not list
>>> pyio.StringIO([])
<_pyio.StringIO object at 0x7f93d4942610> |
|
Date |
User |
Action |
Args |
2009-06-08 19:47:02 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti |
2009-06-08 19:47:02 | alexandre.vassalotti | set | messageid: <1244490422.03.0.396715163252.issue6241@psf.upfronthosting.co.za> |
2009-06-08 19:47:00 | alexandre.vassalotti | link | issue6241 messages |
2009-06-08 19:47:00 | alexandre.vassalotti | create | |
|