"I would, however, like to return home safely, preferably with hands intact."
Coastal Tanzania and Zanzibar is very Muslim, so if you and said partner run into any trouble, it won't be your
hands you return without.
Truthfully, East Africa has long had its share of homophobia, both cultural and legalized. I am not sure how things have been more recently, but I am inclined to think it is not a favorable locale to 'be gay' in.