This should work: ``` python with pandas.HDFStore('file.h5') as f: print(f) ``` as a more convenient form of ``` python with contextlib.closing(pandas.HDFStore('file.h5')) as f: print(f) ``` AFAIK this is a easy as adding the following to `HDFStore` ``` python def _enter_(self): pass def _exit_(self): self.close() ```