[Python-Dev] Request for Pronouncement: PEP 441 (original) (raw)
[Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
Paul Moore p.f.moore at gmail.com
Mon Feb 23 19:49:12 CET 2015
- Previous message: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
- Next message: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 23 February 2015 at 18:40, Brett Cannon <brett at python.org> wrote:
Couldn't you just keep it in memory as bytes and then write directly over the file? I realize that's a bit wasteful memory-wise but it is possible. The docs could mention the memory cost is something to watch out for when doing an in-place replacement. Heck the code could even make it an io.BytesIO instance so the rest of the code doesn't have to care about this special case.
I did consider this option, and I still quite like it. In fact, originally I wrote the API to only be in-place, until I realised that wouldn't work for things bigger than memory (but who has a Python app that's bigger than RAM?)
I'm happy to modify the API along these lines (details to be thrashed out) if people think it's worthwhile. Paul
- Previous message: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
- Next message: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]