1 |
2014-04-02 19:56 GMT+08:00 林守磊 <linxiulei@×××××.com>: |
2 |
> tell me why python3.2 case problem below |
3 |
> |
4 |
> |
5 |
> return u'[%s-%s]' % (unichr(a), unichr(b)) |
6 |
> ^ |
7 |
> SyntaxError: invalid syntax |
8 |
|
9 |
|
10 |
Well, it seems to be an upstream bug, as Python 3.2 does not recognize |
11 |
the old (Python 2.x) style for Unicode literals. Python 3.3 adds the |
12 |
syntax back, so the program will work in Python 3.3 but not 3.2. You |
13 |
definitely should report this to upstream; it won't take much time to |
14 |
fix bugs of this sort. :) |