[New-bugs-announce] [issue28510] PyUnicodeDecodeError_GetObject always return bytes

Serhiy Storchaka report at bugs.python.org
Sat Oct 22 16:53:48 EDT 2016


New submission from Serhiy Storchaka:

Since PyUnicodeDecodeError_GetObject() always returns bytes object, following PyBytes_AsString() never fails and can be replaced with the PyBytes_AS_STRING() macro. This makes error handlers looking a littler clearer and a little faster.

The patch is inspired by the patch of Xiang Zhang (issue28504).

----------
components: Interpreter Core
files: unicodedecodeerror_object_is_bytes.patch
keywords: patch
messages: 279218
nosy: serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: PyUnicodeDecodeError_GetObject always return bytes
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45191/unicodedecodeerror_object_is_bytes.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28510>
_______________________________________


More information about the New-bugs-announce mailing list