Larry Hastings <la...@hastings.org> added the comment:

I can't reproduce this, and it was pretty late in my day when I saw it, so 
let's assume I was mistaken and PyBytes_CheckBuffer() works fine.  Nevertheless 
I think the patch is a good idea--why create a new object when you don't have 
to?  Unless I hear otherwise I'll check it in in the next day or so.

As for what I saw, I suspect it was a deliberate TypeError from the regression 
test suite, passing in an integer 0 as a filename to os.rename().  Naturally 
PyBytes_FromObject() fails to convert that to a bytes object.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14889>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to