[PyPy-issue] [issue613] utf_8_decode (and probably others) doesn't take None for errors argument

Alex Gaynor pypy-dev-issue at codespeak.net
Wed Dec 22 08:09:39 CET 2010


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

alex at alex-laptop:~/projects/pypy$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from codecs import utf_8_decode
>>> utf_8_decode("a", '')
(u'a', 1)
>>> utf_8_decode("a", None)
(u'a', 1)
>>> 
alex at alex-laptop:~/projects/pypy$ ./pypy-c 
Python 2.5.2 (2088ce763fc2, Dec 15 2010, 20:39:16)
[PyPy 1.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``"Why do we end up in a non common
case in the common case?" (fijal)''
>>>> from codecs import utf_8_decode
>>>> utf_8_decode("a", None)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: expected string, got NoneType object

----------
effort: easy
messages: 2026
nosy: agaynor, pypy-issue
priority: bug
release: 1.4
status: unread
title: utf_8_decode (and probably others) doesn't take None for errors argument

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue613>
_______________________________________________________



More information about the Pypy-issue mailing list