[IronPython] unicode object type
Sylvain Hellegouarch
sh at defuze.org
Sat Dec 2 09:42:07 CET 2006
Sylvain Hellegouarch wrote:
> Fredrik Lundh wrote:
>> Sylvain Hellegouarch wrote:
>>
>>> Is this the correct behavior?
>> yes. a Python implementation is not required to have a distinct Unicode
>> string type; see:
>>
>> http://jython.sourceforge.net/docs/differences.html
>>
>> </F>
>
> OK. Thanks for the heads up.
> Mind you I find that a bit confusing and I'd rather have the type to
> display unicode rather than str in that case. But fair enough.
>
Interestingly after reading Peter Bengtsson's last post [1] i tried the
following:
CPython
>>> 't' is u't'
False
>>> u't' is 't'
False
IronPython
>>> 't' is u't'
True
>>> u't' is 't'
True
I can understand why IP or JYthon uses the same type but then the
results don't seem to be consistent with CPython. I might misunderstand
something here. Alternatively I assume using 'is' implies such issues.
- Sylvain
[1] http://www.peterbe.com/plog/is-equal-in-python
More information about the Ironpython-users
mailing list