This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bmerry
Recipients bmerry, methane, tzickel
Date 2020-03-16.09:50:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584352219.42.0.21085977759.issue39974@roundup.psfhosted.org>
In-reply-to
Content
> static_buffers is not a static variable. It is auto local variable.
> So I think other thread don't hijack it.

Oh yes, quite right. I should have looked closer at the code first before commenting. I think this can be closed as not-a-bug, unless +tzickel has example code that gives the wrong output?

> perhaps add an if to check if the backing object is really mutable ? (Py_buffer.readonly)

It's not just the buffer data being mutable that's an issue, it's the owning object. It's possible for an object to expose a read-only buffer, but also allow the buffer (including its size or address) to be mutated through its own API.

> Also, semi related, (dunno where to discuss it), would a good .join() optimization be to add an optional length parameter, like .join(iterable, length=10)

You could always open a separate bug for it, but I can't see it catching on given that one needs to modify one's code for it.
History
Date User Action Args
2020-03-16 09:50:19bmerrysetrecipients: + bmerry, methane, tzickel
2020-03-16 09:50:19bmerrysetmessageid: <1584352219.42.0.21085977759.issue39974@roundup.psfhosted.org>
2020-03-16 09:50:19bmerrylinkissue39974 messages
2020-03-16 09:50:19bmerrycreate