handling of __str__ instead of __unicode__ in python3