Message399883
Not a bug. Use this instead:
def rv(items):
for item in items[:]: # iterate over a copy
if not (item.isspace() or item == ''):
items.remove(item)
return items
Or the same as above, as a list comprehension, no need to make a copy:
items = [item for item in items if not (item.isspace() or item == '')] |
|
Date |
User |
Action |
Args |
2021-08-19 04:36:06 | steven.daprano | set | recipients:
+ steven.daprano, py_ok |
2021-08-19 04:36:06 | steven.daprano | set | messageid: <1629347766.57.0.1248507433.issue44952@roundup.psfhosted.org> |
2021-08-19 04:36:06 | steven.daprano | link | issue44952 messages |
2021-08-19 04:36:06 | steven.daprano | create | |
|