mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Avoid pointless string manipulation in NamedTupleCursor.
Closes ticket #10. Reported by Marko Kreen.
This commit is contained in:
parent
ed6a4c8b1a
commit
f0773d5682
|
@ -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.
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user