A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-September/048745.html below:

[Python-Dev] unicode inconsistency?

[Python-Dev] unicode inconsistency? [Python-Dev] unicode inconsistency?"Martin v. Löwis" martin at v.loewis.de
Thu Sep 9 20:42:38 CEST 2004
Aahz wrote:
>>It will work if 'A' subclasses from 'unicode' but should not be
>>necessary, IMHO.  Any reason why this shouldn't be fixed?
> 
> 
> Check the recent python-dev archives for a long and nauseating thread
> about interactions between __str__ and unicode.

Although that really doesn't answer this particular question. It was
about str() and its interaction with __str__ and __unicode__, and
whether Python should support __unicode__.

For the specific issue, I would maintain that str() should always
return string objects. I'm not so sure about %s since, as Neil
observes, '%s' % unicode_string gives a unicode result. I can't see
any harm by supporting this operation also if __str__ returns
a Unicode object.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4