News for hackers. Stuff that matters.
Re:Writing Python like it's Rust by influxmoment on Sunday May 21, 2023 @06:36AM (#36019581)
[1, 3, 12].sort() == [1, 12, 3]

5 in [5] == false

Re:Writing Python like it's Rust by ptx on Sunday May 21, 2023 @09:14AM (#36020547)
Even setting the sort order aside, just the fact that it both returns the sorted array and also sorts it in-place is not great. I prefer Python's distinction between sorted (returning a sorted copy) and list.sort (sorting in place and returning nothing).