5 ms·
I did that mistake with `sort`. There was a nasty bug that I tried to fix, when I realised that `sort` actually mutates the array and returns it as well. That w
by drinchev 8y ago
I did that mistake with `sort`. There was a nasty bug that I tried to fix, when I realised that `sort` actually mutates the array and returns it as well. That was pretty good lesson to learn.
- aidos 8y agolist.sort returns None in python - and I’m sure it’s been that way for a long time. sorted is the function you mostly want as it returns a new list each time.