Another good way to write this would be:
if len(glossaryMatches) != 0:

Just because I'm assuming that if glossaryMatches isn't an iterable something terribly wrong has happened and it should probably just fail right there.

I'll merge the code though, and you can change it later if you like