Message364304
> 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. |
|
Date |
User |
Action |
Args |
2020-03-16 09:50:19 | bmerry | set | recipients:
+ bmerry, methane, tzickel |
2020-03-16 09:50:19 | bmerry | set | messageid: <1584352219.42.0.21085977759.issue39974@roundup.psfhosted.org> |
2020-03-16 09:50:19 | bmerry | link | issue39974 messages |
2020-03-16 09:50:19 | bmerry | create | |
|