I understand this is from the django-password package, but rather than adding a custom algorithm for fuzzy strong comparison to the edX codebase, it might be good to use a standard implementation instead. http://nltk.org/api/nltk.metrics.html#nltk.metrics.distance.edit_distance or http://docs.python.org/2/library/difflib.html#difflib.SequenceMatcher.ratio might be good candidates for this.