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/048750.html below:

[Python-Dev] unicode inconsistency?

[Python-Dev] unicode inconsistency? [Python-Dev] unicode inconsistency?Batista, Facundo FBatista at uniFON.com.ar
Thu Sep 9 21:14:24 CEST 2004
[Tim Peters]

#- The *real* problem (IMO) is that we don't have a format code that
#- means "stick the unicode representation here", i.e. there's no format
#- code that triggers PyObject_Unicode() directly.  unicode.__mod__
#- treats '%s' that way, but that isn't documented.

You mean something like %u? (actually don't know if the "u" is used for
something else)

If %u triggers PyObject_Unicode(), the following will work?

    class A:
        def __unicode__(self):
            return u'\u1234'
 
    '%u' % u'\u1234'
    '%u' % A() 

.	Facundo
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