def sameValuesAs (self, other):
		# we sort based on packed values since the items do not
		# necessarily implement __cmp__
		def sorter (x, y):
			return cmp(x.pack(), y.pack())

		try:
			for key in set(self.iterkeys()).union(set(other.iterkeys())):
				if (key == Attribute.CODE.MP_REACH_NLRI or key == Attribute.CODE.MP_UNREACH_NLRI):
					continue

				sval = self[key]
				oval = other[key]

				# In the case where the attribute is Communities or
				# extended communities, we want to compare values independently of their order
				if isinstance(sval, Communities):
					if not isinstance(oval, Communities):
						return False

					sval = sorted(sval,sorter)
					oval = sorted(oval,sorter)

				if cmp(sval,oval) != 0:
					return False
			return True
		except __HOLE__:
			return False
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/bgp/message/update/attribute/attributes.py/Attributes.sameValuesAs