mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Whitespace cleanup.
This commit is contained in:
parent
3076046b3f
commit
1aed516938
|
@ -82,13 +82,13 @@ class DictRow(list):
|
|||
return list.__getitem__(self, x)
|
||||
|
||||
def items(self):
|
||||
res = []
|
||||
for n, v in self._index.items():
|
||||
res.append((n, list.__getitem__(self, v)))
|
||||
return res
|
||||
res = []
|
||||
for n, v in self._index.items():
|
||||
res.append((n, list.__getitem__(self, v)))
|
||||
return res
|
||||
|
||||
def keys(self):
|
||||
return self._index.keys()
|
||||
return self._index.keys()
|
||||
|
||||
def values(self):
|
||||
return tuple(self[:])
|
||||
|
@ -102,20 +102,18 @@ class DictRow(list):
|
|||
except:
|
||||
return default
|
||||
|
||||
|
||||
|
||||
class SQL_IN(object):
|
||||
"""Adapt any iterable to an SQL quotable object."""
|
||||
|
||||
def __init__(self, seq):
|
||||
self._seq = seq
|
||||
self._seq = seq
|
||||
|
||||
def getquoted(self):
|
||||
# this is the important line: note how every object in the
|
||||
# list is adapted and then how getquoted() is called on it
|
||||
qobjs = [str(_A(o).getquoted()) for o in self._seq]
|
||||
|
||||
return '(' + ', '.join(qobjs) + ')'
|
||||
qobjs = [str(_A(o).getquoted()) for o in self._seq]
|
||||
return '(' + ', '.join(qobjs) + ')'
|
||||
|
||||
__str__ = getquoted
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user