[pygtk] glitch in Dialog constructor?

Michael Urman murman at gmail.com
Wed Sep 12 21:59:23 WST 2007


On 9/12/07, Alfonso Tarantini <isit81 at fastwebnet.it> wrote:
> It turned out that the object returned by the installed gettext function _()
> called like this:
>  _('_Select')
> is actually an object of <type 'unicode'> and not of <type 'str'>.
[snip]
>
> Is this a bug in PyGTK, GTK+, or not a bug at all?

It sounds like a limitation in PyGTK which might be a bug (because of
its non-symmetric nature across different API calls). However rather
than waiting for any potential bug fixes, try a closer look at the
gettext module. There are multiple different, yet semantically
similar, functions which can be installed as _. One of those returns
str strings instead of unicode strings.

Michael
-- 
Michael Urman


More information about the pygtk mailing list