Serhiy Storchaka added the comment:

What if the third-party parser don't use prepare_input_source()? It can use 
more efficient way if pass just a file name.

Wouldn't be better to move your code into the parser's method parse()? If a 
file is opened inside the parse() method and is not exposed outside, that 
method should close it.

----------
components: +Library (Lib) -Tests
nosy: +eli.bendersky, scoder, serhiy.storchaka
stage:  -> patch review
type:  -> behavior

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

Reply via email to