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 eric.smith
Recipients 78Alpha, eric.smith, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-03-30.22:34:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553985299.22.0.101292588741.issue36480@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-03-30 22:34:59eric.smithsetrecipients: + eric.smith, paul.moore, tim.golden, zach.ware, steve.dower, 78Alpha
2019-03-30 22:34:59eric.smithsetmessageid: <1553985299.22.0.101292588741.issue36480@roundup.psfhosted.org>
2019-03-30 22:34:59eric.smithlinkissue36480 messages
2019-03-30 22:34:59eric.smithcreate