Author chris.jerdonek
Recipients chris.jerdonek, vstinner
Date 2012-11-17.21:29:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za>
In-reply-to
Content
The code below in bytes_decode() is unnecessary:

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

(from http://hg.python.org/cpython/file/e9af9b1ca67e/Objects/bytesobject.c#l2230 )

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

http://hg.python.org/cpython/file/e9af9b1ca67e/Objects/unicodeobject.c#l2811
History
Date User Action Args
2012-11-17 21:29:49chris.jerdoneksetrecipients: + chris.jerdonek, vstinner
2012-11-17 21:29:49chris.jerdoneksetmessageid: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za>
2012-11-17 21:29:49chris.jerdoneklinkissue16495 messages
2012-11-17 21:29:49chris.jerdonekcreate