Issue1661679

classification
Title: Invalid types.UnicodeType
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, hsk0, pekka.klarck
Priority: normal Keywords:

Created on 2007-02-16.17:03:18 by pekka.klarck, last changed 2007-02-28.18:53:52 by cgroves.

Messages
msg1471 (view) Author: Pekka Klärck (pekka.klarck) Date: 2007-02-16.17:03:18
types.UnicodeType seems to contain string type and not unicode type. See example below.


Jython 2.2b1 on java1.5.0_10 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import types
>>> types.UnicodeType
<type 'str'>
1
>>> type(u'xxx') is types.UnicodeType
0
>>> types.StringType
<type 'str'>
>>> types.StringTypes
(<type 'str'>, <type 'unicode'>)
>>> type(u'xxx') in types.StringTypes
1
msg1472 (view) Author: howard kapustein (hsk0) Date: 2007-02-21.14:13:36
src\org\python\modules\types.java, line 53
        dict.__setitem__("UnicodeType", PyType.fromClass(PyString.class));
that should be
        dict.__setitem__("UnicodeType", PyType.fromClass(PyUnicode.class));

I'll submit a patch
msg1473 (view) Author: Charlie Groves (cgroves) Date: 2007-02-28.18:53:52
Fixed in r3126.
History
Date User Action Args
2007-02-16 17:03:18pekka.klarckcreate