3) Running the python interpreter. Python's main power comes with how easy it is to get something that works. Part of that power is the rapid prototyping that is made possible by the interpreter. Python comes with a native interpreter that can be used simply by running: [email protected] > python. We can quit with Ctrl+D.
Given both the documentation of Python 3 contextlib or contextlib2, I’d say your usage is pretty standard for the tools at play. However, there is something bothering me a bit in your code: def get_histogram(self, name): """Return the histogram identified by name from the file.