[Python-porting] Questions for porting unicode with backward compatibility
"Martin v. Löwis"
martin at v.loewis.de
Tue May 21 18:30:18 CEST 2013
Am 21.05.13 10:32, schrieb Chitrank Dixit:
> 1) alternative to unichr() in python 3.3 (is it chr() or anything else
> is available).
>
> 2) does using six module rather than doing some try catch stuff is a
> better option.
I agree with Lennart: "chr", and "it depends".
> 3) does next() method behavior is same in both python 2.7 and python 3.3.
I disagree with Lennart: the next() *method* does not exist in Python 3.3:
>>> x=iter("foo")
>>> x.next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str_iterator' object has no attribute 'next'
The next() *function* exists in both versions, and has the same behavior.
Regards,
Martin
More information about the Python-porting
mailing list