@classmethod
    def _subclass_from_prefix(class_, prefix):
        """Get a column subclass for the given `prefix`."""

        cname = '%sCol' % prefix
        class_from_prefix = class_._class_from_prefix
        if cname in class_from_prefix:
            return class_from_prefix[cname]
        atombase = getattr(atom, prefix % '%sAtom')

        class NewCol(class_, atombase):
            """Defines a non-nested column of a particular type.

            The constructor accepts the same arguments as the equivalent
            `Atom` class, plus an additional ``pos`` argument for
            position information, which is assigned to the `_v_pos`
            attribute.

            """

            def __init__(self, *args, **kwargs):
                pos = kwargs.pop('pos', None)
                class_from_prefix = self._class_from_prefix
                atombase.__init__(self, *args, **kwargs)
                # The constructor of an abstract atom may have changed
                # the class of `self` to something different of `NewCol`
                # and `atombase` (that's why the prefix map is saved).
                if self.__class__ is not NewCol:
                    colclass = class_from_prefix[self.prefix()]
                    self.__class__ = colclass
                self._v_pos = pos

            __eq__ = same_position(atombase.__eq__)
            _is_equal_to_atom = same_position(atombase._is_equal_to_atom)

            # XXX: API incompatible change for PyTables 3 line
            # Overriding __eq__ blocks inheritance of __hash__ in 3.x
            # def __hash__(self):
            #    return hash((self._v_pos, self.atombase))

            if prefix == 'Enum':
                _is_equal_to_enumatom = same_position(
                    atombase._is_equal_to_enumatom)

        NewCol.__name__ = cname

        class_from_prefix[prefix] = NewCol
        return NewCol

    # Special methods
    # ~~~~~~~~~~~~~~~
dataset/ETHPy150Open PyTables/PyTables/tables/description.py/Col._subclass_from_prefix/swapped operands of `%`