STINNER Victor added the comment:

2015-04-01 14:02 GMT+02:00 Serhiy Storchaka <rep...@bugs.python.org>:
> getlines() already returns an empty list on OSError.

Oh, I misread getlines(), you're right.

>  Clearing the cache on MemoryError will help to avoid other MemoryErrors. And 
> after this there is a large chance

I agree, but please avoid retrying on MemoryError. IMO clearing the
cache and return [] is enough.

> If don't change linecache, then we should patch all places where linecache is 
> used: traceback, idlelib, warnings, trace, debugger, etc. I intentionally 
> made the fix at the low level, so it fixes all issues in one place.

I agree.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23838>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to