voikko / corevoikko

Libvoikko and essential linguistic resources
Other
89 stars 25 forks source link

Python improvements #28

Closed akx closed 7 years ago

akx commented 7 years ago

Hi (tai terve),

I noticed libvoikko.py wasn't exactly Pythonic in style, so I wanted to do something about it.

In addition to the style changes (i.e. cleaning up imports, using 4 spaces instead of tabs and rewrapping very long lines, mostly -- use git diff -w d594bfc), I also separated the lower-level Voikko CDLL into another object in 265a9fe for ease of use and development.

The external API remains the same nevertheless, that is:

⚠️ If you think these changes are too radical, I wouldn't be opposed to forking this to a new repository/library, say, voikko/voikko-py that I'd be glad to maintain. 😸

hatapitk commented 7 years ago

Thank you very much! The changes look good to me (and did not cause any problems after light testing) so I merged them. It is good to keep the external API at least for libvoikko 4.1.1 but in the future we could consider improvements there as well.