Message212673
> However, do note that the semantics will end up different from other uses of
unicode. e.g.:
> >>> "aa".strip(u"b")
>
> u'aa'
And this behavior is weird.
>>> print 'À\n'.strip('\n')
À
>>> print 'À\n'.strip(u'\n')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0:
ordinal not in range(128)
The self argument of str.strip is variable, but the chars argument is almost
always a literal and affected by unicode_literals future. |
|
Date |
User |
Action |
Args |
2014-03-03 21:28:28 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, pitrou, vstinner, alexandre.vassalotti, benjamin.peterson, skrah |
2014-03-03 21:28:28 | serhiy.storchaka | link | issue20015 messages |
2014-03-03 21:28:28 | serhiy.storchaka | create | |
|