Message212673
| Author |
serhiy.storchaka |
| Recipients |
alexandre.vassalotti, benjamin.peterson, pitrou, serhiy.storchaka, skrah, terry.reedy, vstinner |
| Date |
2014年03月03日.21:28:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<73364350.ikPqbYoH6T@raxxla> |
| In-reply-to |
<1393861006.69.0.709402904536.issue20015@psf.upfronthosting.co.za> |
| Content |
> 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. |
|