Changes between Initial Version and Version 1 of Ticket #25730, comment 3


Ignore:
Timestamp:
Nov 10, 2015, 10:19:01 PM (9 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25730, comment 3

    initial v1  
    11Ahh I think I see what you mean by unicode string returned.
    22
    3 The default `__str__` implementation returns `'%s object' % self.__class__.__name__` if `hasattr(self, '__unicode__')`.
     3The default `__str__` implementation returns `u'%s object' % self.__class__.__name__` if `not hasattr(self, '__unicode__')`.
    44
    55This 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.
Back to Top