def from_pairs(cls, doc, pairs):
        """
        Construct an enumeration from an iterable of pairs.

        :param doc: See `Enum.__init__`.
        :type pairs: ``Iterable[Tuple[unicode, unicode]]``
        :param pairs: Iterable to construct the enumeration from.
        :rtype: Enum
        """
        values = (EnumItem(value, desc) for value, desc in pairs)
        return cls(doc=doc, values=values)
Construct an enumeration from an iterable of pairs.

        :param doc: See `Enum.__init__`.
        :type pairs: ``Iterable[Tuple[unicode, unicode]]``
        :param pairs: Iterable to construct the enumeration from.
        :rtype: Enum