printing correctly types for python generators