hermanschaaf/mafan — pull request #8 by tsroten (2013-04-26 17:15:29+00:00)
Title: Rename and Simplify contains_latin

The contains_latin function checks for latin letters along with certain ASCII punctuation. On an empty string, it returns True.

This pull request involves three changes:

1. contains_latin is renamed to contains_ascii. I think this name is a little more accurate (if this pull request is accepted, you could add an alias for backwards-compatibility). Also, the search field was extended to include all [ASCII printable characters](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). Chinese typing often uses ASCII non-printable characters such as tabs and spaces, so those are not searched for.
2. The function was simplified from two functions (contains_english, contains_latin) into one function using re.search.
3. Tests were added for contains_ascii.