diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-09 11:14:01 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-09 11:17:02 +0000 |
| commit | f0773d5682882069941a139c4197d2afd0aeca21 (patch) | |
| tree | 9da71f6906d584bf6a1d96b802851cf719351620 | |
| parent | ed6a4c8b1aa73402f23dbeaf0fa129a3045a2653 (diff) | |
| download | psycopg2-f0773d5682882069941a139c4197d2afd0aeca21.tar.gz | |
Avoid pointless string manipulation in NamedTupleCursor.
Closes ticket #10. Reported by Marko Kreen.
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | lib/extras.py | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -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. diff --git a/lib/extras.py b/lib/extras.py index 47dcbb2..d19c560 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -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): |
