Removed comments.
Fix test docs and syntax.
Change too-general Exception to more-specific TypeError.