[New-bugs-announce] [issue14889] PyBytes_FromObject(bytes_object) fails

Larry Hastings report at bugs.python.org
Wed May 23 16:39:51 CEST 2012


New submission from Larry Hastings <larry at hastings.org>:

If you pass a valid PyUnicodeObject into PyUnicode_AsObject(), it incref's the original object and returns it.

If you pass a valid PyBytesObject into PyBytes_AsObject()... it fails.

I assert that in the PyBytes_AsObject() should behave like PyUnicode_AsObject() when faced with an identity transformation.

(Brett: I tagged you because I saw your name in the comments, so I figured you were a good candidate.)

----------
assignee: larry
messages: 161414
nosy: brett.cannon, larry
priority: normal
severity: normal
stage: needs patch
status: open
title: PyBytes_FromObject(bytes_object) fails
type: behavior
versions: Python 3.3

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


More information about the New-bugs-announce mailing list