On 5 Aug, 23:22, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> And that gives me the *full* bytestring, not only until the first zero? > I can't try that right now (not at work anymore), but if it's that easy, > that would be great. It should, and if it does not it is a bug in Cython. The len() function should work similarly in Python and Cython: It should just call the object's __len__ method. Cython has no idea that your Python object bytestring is a byte string, nor does Cython care. >>> bs = '\x00'*10 # bytes string with 10 zeros >>> len(bs) 10 >>> bs.__len__() 10 -- http://mail.python.org/mailman/listinfo/python-list