本文整理汇总了Python中compound.find_members方法的典型用法代码示例。如果您正苦于以下问题:Python compound.find_members方法的具体用法?Python compound.find_members怎么用?Python compound.find_members使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类compound
的用法示例。
在下文中一共展示了compound.find_members方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find_compounds_and_members
# 需要导入模块: import compound [as 别名]
# 或者: from compound import find_members [as 别名]
def find_compounds_and_members(self, details):
"""
Returns a list of all compounds and their members which match details
"""
results = []
for compound in self.compound:
members = compound.find_members(details)
if members:
results.append([compound, members])
else:
if details.match(compound):
results.append([compound, []])
return results
示例2: find_members
# 需要导入模块: import compound [as 别名]
# 或者: from compound import find_members [as 别名]
def find_members(self, details):
"""
Returns a list of all members which match details
"""
results = []
for member in self.member:
if details.match(member):
results.append(member)
return results