Closed aahaselgrove closed 5 years ago
Totally agree. +1
It looks like the row-as-list is constructed here:
The tuple is constructed here:
https://github.com/mfenniak/pg8000/blob/60fbf74147709ab52f89a31fbaeda8194a10cec4/pg8000/core.py#L976
Hi all, I've taken the approach of using the quickest data structure for the situation. I think it's about 10% slower to create a list than a tuple if it's created all in one go. I'm happy to be argued into changing it, but this is the reason for the decision.
When I execute a query and call fetchall, the funtion returns a tuple, where each element is a list representing a row of the result. Wouldn't it make more sense to be the other way around (i.e. a list of tuples)?