Closed kosack closed 7 years ago
I would suggest renaming (or adding an alias):
file_open() should be open_file(), to follow naming conventions (start with verb).
file_open()
open_file()
There is already close_file(), for example.
close_file()
Also, it would be good to provide a context manager interface for open_file():
with pyhessio.open_file(filename) as hessiofile: # do things # file is automatically closed
see https://docs.python.org/3/library/contextlib.html
-> https://github.com/cta-observatory/pyhessio/pull/39
I would suggest renaming (or adding an alias):
file_open()
should beopen_file()
, to follow naming conventions (start with verb).There is already
close_file()
, for example.Also, it would be good to provide a context manager interface for open_file():
see https://docs.python.org/3/library/contextlib.html