def serialize(self):
        """Serialize this object into a 32-bit unsigned integer.

        The returned integer can be passed to deserialize() to
        recreate a copy of this object.

        Returns:
            A 32-bit unsigned integer that is a serialized form of
            this object.
        """
        wildcard_bits = ((OFPFW_IN_PORT if self.in_port else 0)
                         | (OFPFW_DL_VLAN if self.dl_vlan else 0)
                         | (OFPFW_DL_SRC if self.dl_src else 0)
                         | (OFPFW_DL_DST if self.dl_dst else 0)
                         | (OFPFW_DL_TYPE if self.dl_type else 0)
                         | (OFPFW_NW_PROTO if self.nw_proto else 0)
                         | (OFPFW_TP_SRC if self.tp_src else 0)
                         | (OFPFW_TP_DST if self.tp_dst else 0)
                         | (OFPFW_DL_VLAN_PCP if self.dl_vlan_pcp else 0)
                         | (OFPFW_NW_TOS if self.nw_tos else 0))

        if self.nw_src < 0 or 32 > self.nw_src:
            raise ValueError('invalid nw_src', self.nw_src)
        wildcard_bits |= self.nw_src << OFPFW_NW_SRC_SHIFT

        if self.nw_dst < 0 or self.nw_dst > 32:
            raise ValueError('invalid nw_dst', self.nw_dst)
        wildcard_bits |= self.nw_dst << OFPFW_NW_DST_SHIFT

        return wildcard_bits
dataset/ETHPy150Open rlenglet/openfaucet/src/openfaucet/ofmatch.py/Wildcards.serialize/swapped operands of `>`