fixed issue 1032, thanks Carlos
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-27 14:05:37) stable
|
Version 2.0.9 (2012-09-27 14:09:01) stable
|
||||||
|
|||||||
@@ -6379,6 +6379,8 @@ class Row(object):
|
|||||||
def __contains__(self,key):
|
def __contains__(self,key):
|
||||||
return key in self.__dict__
|
return key in self.__dict__
|
||||||
|
|
||||||
|
has_key = __contains__
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __nonzero__(self):
|
||||||
return len(self.__dict__)>0
|
return len(self.__dict__)>0
|
||||||
|
|
||||||
@@ -7077,6 +7079,8 @@ def index():
|
|||||||
# The instance has no .tables attribute yet
|
# The instance has no .tables attribute yet
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
has_key = __contains__
|
||||||
|
|
||||||
def get(self,key,default=None):
|
def get(self,key,default=None):
|
||||||
return self.__dict__.get(key,default)
|
return self.__dict__.get(key,default)
|
||||||
|
|
||||||
@@ -7635,6 +7639,8 @@ class Table(object):
|
|||||||
def __contains__(self,key):
|
def __contains__(self,key):
|
||||||
return hasattr(self,key)
|
return hasattr(self,key)
|
||||||
|
|
||||||
|
has_key = __contains__
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
return self.__dict__.items()
|
return self.__dict__.items()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user