[issue39880] string.lstrip() with leading '3's

2020-03-06 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39880] string.lstrip() with leading '3's

2020-03-06 Thread László Kiss Kollár

László Kiss Kollár  added the comment:

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 https://docs.python.org/3/library/stdtypes.html#str.lstrip.

--
nosy: +lkollar

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39880] string.lstrip() with leading '3's

2020-03-06 Thread Clayton Bingham


New submission from Clayton Bingham :

Code to reproduce the behavior:

```
string = 
'h.pt3dadd(.994527806812,7310.741605031661,-152.492,0.2815384615384615,sec=sectionList[1396])\n'
print(string.lstrip('h.pt3dadd(').split(','))
```

The lstrip method removed 'h.pt3dadd(' but also removes the 3's before the 
first decimal in the remaining string.

--
messages: 363555
nosy: Clayton Bingham
priority: normal
severity: normal
status: open
title: string.lstrip() with leading '3's
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com