Message 263623 - Python tracker
Python implementation passes bytearray to underlying write and delete it's content just after that. Thus saving written data was never worked, and making it working don't worth efforts. I agree with you, we should add a warning against saving. This might be a part of issue20699. As for original issue, this is potential crash, and we should fix this.