Ignore leading/trailing whitespace in docstrings

Also support Python 2.7 with respect to opnames.