Fix comments and unittest for market.py and style

Trying to make the right commit to  the develop branch.
Please leave that as it were. A long line may be hard to read, but a line arbitrarily broken is even worse. In Python, indentation is crucial for program structure; having to watch out for `\` is tiresome and error-prone.