Next / Previous / Contents / Shipman's homepage

6.8. Txny.abbrToEngComma()

Nearly identical to Section 6.7, “Txny.abbrToEng(), but here we don't normalize the name.

xnomo3.py
# - - -   T x n y . a b b r T o E n g C o m m a   - - -

    def abbrToEngComma ( self, abbr ):
        """Like .abbrToEng(), but leaves name inverted.
        """
        #-- 1 --
        # [ if abbr, standardized, is a key in self.__abbrEng ->
        #     rawEng  :=  the corresponding raw English name
        #   else -> raise KeyError ]
        rawEng = self.abbrToRawEng(abbr)

        #-- 2 --
        # [ return rawEng with any underbars removed ]
        return rawEng.replace('_', '')