Merge pull request #24 from abelsonlive/master

update table.update now accepting keys as string, too
This commit is contained in:
gka 2013-08-12 01:47:00 -07:00
commit 39d870a36a

View File

@ -117,6 +117,10 @@ class Table(object):
they will be created based on the settings of ``ensure`` and they will be created based on the settings of ``ensure`` and
``types``, matching the behavior of :py:meth:`insert() <dataset.Table.insert>`. ``types``, matching the behavior of :py:meth:`insert() <dataset.Table.insert>`.
""" """
# check whether keys arg is a string and format as a list
if isinstance(keys, basestring):
keys = [keys]
self._check_dropped() self._check_dropped()
if not len(keys) or len(keys)==len(row): if not len(keys) or len(keys)==len(row):
return False return False