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.

Title: string.lstrip() with leading '3's
Type: Stage: resolved
Components: Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Clayton Bingham, lkollar
Priority: normal Keywords:

Created on 2020-03-06 21:14 by Clayton Bingham, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg363555 - (view) Author: Clayton Bingham (Clayton Bingham) Date: 2020-03-06 21:14
Code to reproduce the behavior:

string = 'h.pt3dadd(3333.994527806812,7310.741605031661,-152.492,0.2815384615384615,sec=sectionList[1396])\n'

The lstrip method removed 'h.pt3dadd(' but also removes the 3's before the first decimal in the remaining string.
msg363558 - (view) Author: László Kiss Kollár (lkollar) Date: 2020-03-06 21:36
The argument in lstrip() is a set of characters which are stripped from the string and not a full substring. As the documentation states: "The chars argument is not a prefix; rather, all combinations of its values are stripped" See
Date User Action Args
2022-04-11 14:59:27adminsetgithub: 84061
2020-03-06 21:53:00steven.dapranosetstatus: open -> closed
resolution: not a bug
stage: resolved
2020-03-06 21:36:39lkollarsetnosy: + lkollar
messages: + msg363558
2020-03-06 21:14:18Clayton Binghamcreate