New submission from Antoine Pitrou <pit...@free.fr>:

>>> marshal.loads('T')
True
>>> marshal.loads(b'T')
True

Contrast with:

>>> marshal.load(io.BytesIO(b'T'))
True
>>> marshal.load(io.StringIO('T'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f.read() returned not bytes but str

----------
components: Extension Modules
keywords: easy
messages: 154778
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: marshal.loads accepts unicode strings
type: behavior
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14177>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to