Eric V. Smith <[email protected]> added the comment:
I cannot run that example on my computer.
Please reduce this to a single line of code, with no imports, that calls
.strip() and shows your problem. Ideally you will just use constants, and not
computed strings.
Something like:
>>> 'magenta.zip'.strip('pizamn')
'genta.'
And also, show that exact same line of code executed on both platforms.
That said, the problem is likely in your usage of .strip(). Please re-read the
documentation: it does not remove substrings from a given string, it removes
any of the given characters from the beginning and end of the string.
So, this is correct:
>>> 'magenta.zip'.strip('pm')
'agenta.zi'
You're probably seeing some difference due to upper or lower case filenames on
the two platforms.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36480>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com