Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate does not return unicode object when translating empty string #8

Closed
rbu opened this issue Sep 16, 2014 · 0 comments
Closed

Comments

@rbu
Copy link

rbu commented Sep 16, 2014

translate does not return consistent types. Consider:

> from translate import Translator
> translator= Translator(to_lang="zh")
> print type(translator.translate("a"))
<type 'unicode'>
> print type(translator.translate(""))
<type 'str'>

This makes writing code that is future-proof for Python 3 harder than necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants