Exceptions relieve the programmer of tedious writing boilerplate code -- without removing the semantics of said code -- and they allow the programmer to arrange the code so that error handling code is more separate from the main program logic.
Great Work. We've already created unreleased patches to Virtaal our desktop translation tool.
One issue is that the list of languages is hard coded. I realise that's because Google doesn't supply them. But it would be nice to just query Google and get that list at startup.
I'd love a way to query the translate.py classes to find out if a source or target language is supported. Currently I just get a TranslationError would be nicer if it raised a more fine grained Exception so that our code can then decide not to support that target language.
Reply To This Comment
About the site:
Peter Krumins' blog about programming, hacking, software reuse, software ideas, computer security, browserling, google and technology.
Great Work. We've already created unreleased patches to Virtaal our desktop translation tool.
One issue is that the list of languages is hard coded. I realise that's because Google doesn't supply them. But it would be nice to just query Google and get that list at startup.
I'd love a way to query the translate.py classes to find out if a source or target language is supported. Currently I just get a TranslationError would be nicer if it raised a more fine grained Exception so that our code can then decide not to support that target language.
Reply To This Comment