Adds attr __name__ for type #246

Adds __name__ for type.