Message404859
It is expected behavior. Your code is equivalent to:
_result = []
for i in your_list:
_result.append(your_list.append(i))
which is equivalent to:
_result = []
_j = 0
while _j < len(your_list):
i = your_list[_j]
_result.append(your_list.append(i))
_j += 1
It is an infinite loop (because len(your_list) is increased after your_list.append(i)), and two lists grow with every iteration. |
|
Date |
User |
Action |
Args |
2021-10-23 08:03:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Spencer Brown, txlbr |
2021-10-23 08:03:04 | serhiy.storchaka | set | messageid: <1634976184.79.0.00520761830035.issue45579@roundup.psfhosted.org> |
2021-10-23 08:03:04 | serhiy.storchaka | link | issue45579 messages |
2021-10-23 08:03:04 | serhiy.storchaka | create | |
|