本文整理汇总了Python中cybox.common.PatternFieldGroup._conditions_equal方法的典型用法代码示例。如果您正苦于以下问题:Python PatternFieldGroup._conditions_equal方法的具体用法?Python PatternFieldGroup._conditions_equal怎么用?Python PatternFieldGroup._conditions_equal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cybox.common.PatternFieldGroup
的用法示例。
在下文中一共展示了PatternFieldGroup._conditions_equal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __eq__
# 需要导入模块: from cybox.common import PatternFieldGroup [as 别名]
# 或者: from cybox.common.PatternFieldGroup import _conditions_equal [as 别名]
def __eq__(self, other):
# None-type checking
if not other:
return False
# It is possible to compare a Property to a single value if
# the Property defines only the "value" property.
if not isinstance(other, BaseProperty) and self.is_plain():
return self.value == other
return (
self.value == other.value and
self.id_ == other.id_ and
self.idref == other.idref and
self.datatype == other.datatype and
self.appears_random == other.appears_random and
self.is_obfuscated == other.is_obfuscated and
self.obfuscation_algorithm_ref == other.obfuscation_algorithm_ref and
self.is_defanged == other.is_defanged and
self.defanging_algorithm_ref == other.defanging_algorithm_ref and
self.refanging_transform_type == other.refanging_transform_type and
self.refanging_transform == other.refanging_transform and
self.observed_encoding == other.observed_encoding and
PatternFieldGroup._conditions_equal(self, other) and
self.bit_mask == other.bit_mask and
self.pattern_type == other.pattern_type and
self.regex_syntax == other.regex_syntax and
self.is_case_sensitive == other.is_case_sensitive and
self.has_changed == other.has_changed and
self.trend == other.trend
)