Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

After a look at the patch and at linecache.py, some comments:
- 'rbU' is strange, the 'U' flag has no effect for binary files, so it
should just be 'rb' instead
- I'm surprised we don't have a test_linecache.py in Lib/test
- The following lines at the end of updatecache() deserve a cleanup:

    try:
        lines = [line if isinstance(line, str) else str(line, coding)
                 for line in lines]
    except:
        pass  # Hope for the best

- The very shallow "except Exception as msg" should also be restricted
to (IOError, OSError) IMHO.

----------
nosy: +pitrou

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to