(self, i)
return self._comm_symbols2i[i]
get the commutation group number corresponding to ``i``

        ``i`` can be a symbol or a number or a string

        If ``i`` is not already defined its commutation group number
        is set.
get the commutation group number corresponding to ``i``
get the commutation group number corresponding to i
def comm_symbols2i(self, i):
        """
        get the commutation group number corresponding to ``i``

        ``i`` can be a symbol or a number or a string

        If ``i`` is not already defined its commutation group number
        is set.
        """
        if i not in self._comm_symbols2i:
            n = len(self._comm)
            self._comm.append({})
            self._comm[n][0] = 0
            self._comm[0][n] = 0
            self._comm_symbols2i[i] = n
            self._comm_i2symbol[n] = i
            return n
        return self._comm_symbols2i[i]
def comm_symbols2i ( self , i ) : if i not in self . _comm_symbols2i : n = len ( self . _comm ) self . _comm . append ( { } ) self . _comm [ n ] [ 0 ] = 0 self . _comm [ 0 ] [ n ] = 0 self . _comm_symbols2i [ i ] = n self . _comm_i2symbol [ n ] = i return n return self . _comm_symbols2i [ i ]