This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <>
> 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:28serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, pitrou, vstinner, alexandre.vassalotti, benjamin.peterson, skrah
2014-03-03 21:28:28serhiy.storchakalinkissue20015 messages
2014-03-03 21:28:28serhiy.storchakacreate