Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Yes, you must use y* instead: see http://docs.python.org/dev/3.0/c-api/arg.html
y# would not be safe to use with bytearray since another thread could mutate the bytearray in-between, possibly reallocating the internal buffer (to shrink or grow it), and lead to a segfault when your thread uses the obsolete pointer. IMO, the documentation should mention that the '*' codes (y*, s*, etc.) must be used in preference to the '#' codes, which are there for backwards compatibility. ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, pitrou title: bytearray incompatible with bytes -> bytearray incompatible with y# versions: +Python 2.6 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3753> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com