Avoid pointless string manipulation in NamedTupleCursor.

Closes ticket #10. Reported by Marko Kreen.
This commit is contained in:
Daniele Varrazzo 2010-11-09 11:14:01 +00:00
parent ed6a4c8b1a
commit f0773d5682
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,8 @@
* psycopg/microprotocols.c: small optimizations.
* Avoid pointless string manipulation in NamedTupleCursor (ticket #10)
2010-11-08 Daniele Varrazzo <daniele.varrazzo@gmail.com>
* psycopg/microprotocols.c: use faster function to build tuples.

View File

@ -285,8 +285,7 @@ class NamedTupleCursor(_cursor):
raise self._exc
else:
def _make_nt(self, namedtuple=namedtuple):
return namedtuple("Record",
" ".join([d[0] for d in self.description]))
return namedtuple("Record", [d[0] for d in self.description])
class LoggingConnection(_connection):