pyfastx
pyfastx copied to clipboard
How to safely close file handles with Fastx?
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.
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.
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?
Ok, I will do that. Thank you!