kivy/kivy — pull request #539 by aspidites (2012-06-27 07:45:48+00:00)
Title: Text core improvements

The only method I didn't mess with that I think needs re-factoring is `render`, but as I won't be tackling that for a while, you should go ahead and merge this pull request now*

I've noted key points in most of the commits, so refer to those and the commit messages for details. Basically, I reduced a lot of if/elif/else clauses to what I thought were more idiomatic constructs. The only thing that doesn't (to my knowledge) behave the exact same as the original code is `shorten`-- the result is more symmetrical than the previous implementation, but the important part is that I've reduced the number of lines to implement the same feature considerably, and removed the while loop entirely.

* assuming you approve of all the changes