Ability to use 'where ITEM in part.part.part' for the Query Gramplet
This commit is contained in:
parent
4051984031
commit
fe6806de57
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user