News for hackers. Stuff that matters.
Re:Thinking Psycopg3 by orf on Wednesday March 11, 2020 @08:23PM (#22552261)
> sorted(my_dict.keys())

Or just:

> sorted(my_dict)

Sorting keys like that is also weird. Keys are insertion ordered, utilize that property where you can and avoid needlessly re-sorting.

Re:Thinking Psycopg3 by somacert on Wednesday March 11, 2020 @08:56PM (#22552432)
Glorious, Thank you kind soul for listening to my slightly raving rant.

Now I feel several sorts of ashamed at missing what is kind of a core function.

salutes

Re:Thinking Psycopg3 by hansvm on Wednesday March 11, 2020 @09:38PM (#22552662)
Fwiw, make sure you're using a newish python version. They weren't always sorted by default.
Re:Thinking Psycopg3 by ledauphin on Wednesday March 11, 2020 @10:36PM (#22553075)
3.6+