Ability to use 'where ITEM in part.part.part' for the Query Gramplet

This commit is contained in:
Doug Blank 2013-12-20 01:28:54 -05:00
parent 4051984031
commit fe6806de57

View File

@ -423,6 +423,9 @@ class Struct(object):
def __len__(self):
return len(self.struct)
def __contains__(self, item):
return item in self.struct
def __getattr__(self, attr):
"""
Called when getattr fails. Lookup attr in struct; returns Struct