New submission from Chris Jerdonek:

The code below in bytes_decode() is unnecessary:

    if (encoding == NULL)
        encoding = PyUnicode_GetDefaultEncoding();

(from )

because PyUnicode_FromEncodedObject() already handles the case of NULL encoding 
(inside normalize_encoding() called by PyUnicode_Decode()):

components: Interpreter Core
keywords: easy
messages: 175811
nosy: chris.jerdonek, haypo
priority: normal
severity: normal
status: open
title: bytes_decode() unnecessarily examines encoding
type: enhancement
versions: Python 3.4

Python tracker <>
Python-bugs-list mailing list

Reply via email to