Changes between Initial Version and Version 1 of Ticket #25730, comment 3
- Timestamp:
- Nov 10, 2015, 10:19:01 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25730, comment 3
initial v1 1 1 Ahh I think I see what you mean by unicode string returned. 2 2 3 The default `__str__` implementation returns ` '%s object' % self.__class__.__name__` if `hasattr(self, '__unicode__')`.3 The default `__str__` implementation returns `u'%s object' % self.__class__.__name__` if `not hasattr(self, '__unicode__')`. 4 4 5 5 This isn't really an issue because `self.__class__.__name__` can only contain ASCII characters on Python 2 and thus the returned string is always successfully coerced to a bytestring when required unless I'm missing something.