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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28510>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to