bidict/_base.py
def _inv_cls(cls):
        """The inverse of this bidict type, i.e. one with *_fwdm_cls* and *_invm_cls* swapped."""
        if cls._fwdm_cls is cls._invm_cls:
            return cls
        if not getattr(cls, '_inv_cls_', None):
            class _Inv(cls):
                _fwdm_cls = cls._invm_cls
                _invm_cls = cls._fwdm_cls
                _inv_cls_ = cls
            _Inv.__name__ = cls.__name__ + 'Inv'
            cls._inv_cls_ = _Inv
        return cls._inv_cls_
def _inv_cls(cls):
        """The inverse of this bidict type, i.e. one with *_fwdm_cls* and *_invm_cls* swapped."""
        if cls._fwdm_cls is cls._invm_cls:
            return cls
        if not getattr(cls, '_inv_cls_', None):
            class _Inv(cls):
                _fwdm_cls = cls._invm_cls
                _invm_cls = cls._fwdm_cls
                _inv_cls_ = cls
            _Inv.__name__ = cls.__name__ + 'Inv'
            cls._inv_cls_ = _Inv
        return cls._inv_cls_
def _inv_cls ( cls ) : if cls . _fwdm_cls is cls . _invm_cls : return cls if not getattr ( cls , '_inv_cls_' , None ) : class _Inv ( cls ) : _fwdm_cls = cls . _invm_cls _invm_cls = cls . _fwdm_cls _inv_cls_ = cls _Inv . __name__ = cls . __name__ + 'Inv' cls . _inv_cls_ = _Inv return cls . _inv_cls_
The inverse of this bidict type, i.e. one with *_fwdm_cls* and *_invm_cls* swapped.
The inverse of this bidict type i . e . one with * _fwdm_cls * and * _invm_cls * swapped .