MartinThoma / hwrt

A toolset for handwriting recognition
MIT License
69 stars 17 forks source link

hwrt/download.py: avoid big file MemoryError #23

Closed thesunlover closed 4 years ago

thesunlover commented 9 years ago

https://github.com/MartinThoma/hwrt/issues/17#issuecomment-90996381

landscape-bot commented 9 years ago

Code Health Repository health decreased by 0.05% when pulling 1ce03ce on nerksi:master into 584965f on MartinThoma:master.

thesunlover commented 9 years ago

Shouldn't there be a file.close() when using "with" statement?

MartinThoma commented 9 years ago

No, that is the beauty of the with statement. As soon as the block is over, the exit action (in case of open it is close) is executed.

landscape-bot commented 9 years ago

Code Health Repository health decreased by 0.03% when pulling 7a3b572 on nerksi:master into 584965f on MartinThoma:master.

landscape-bot commented 9 years ago

Code Health Repository health increased by 0.33% when pulling 56e7045 on nerksi:master into 584965f on MartinThoma:master.

MartinThoma commented 4 years ago

@thesunlover Wow, this is crazy - it took 5 years for me to merge this. I'm so sorry... also, that I complained about minor details such as spacing. I merged your change now. Thank you for your support :pray: