There's a lot of unnecessary byte copying in the code. I would like to change this in a way where the application has to expect side effects if it modifies byte views passed to a function or method that stores this data. The docstring always has to explicitly state if it stores a byte view and for how long. Because of this change, a major release would need to be done.
However, I believe it is the correct approach compared to the other way around (always copy) because that would make it impossible to write an efficient library.
There's a lot of unnecessary byte copying in the code. I would like to change this in a way where the application has to expect side effects if it modifies byte views passed to a function or method that stores this data. The docstring always has to explicitly state if it stores a byte view and for how long. Because of this change, a major release would need to be done.
However, I believe it is the correct approach compared to the other way around (always copy) because that would make it impossible to write an efficient library.