How to safely close file handles with Fastx?
bjpop opened this issue · 3 comments
bjpop commented
It is not clear how to safely close any file handles that are opened by Fastx (or any of the other classes provided by this library).
It would be nice to be able to use Fastx with contextlib for example.
lmdu commented
You don't have to worry about the opened file handle. Before Fastx object is destroyed, the opened file handle will automatically be closed by pyfastx.
bjpop commented
Fair enough, although sometimes it is useful to be able to close the file handle before waiting for GC to remove the object.
Perhaps this detail can be added to the docs?
lmdu commented
Ok, I will do that. Thank you!