(cls, symbol)
Creates a piece instance from a piece symbol.

        :raises ValueError: If the symbol is invalid.
Creates a piece instance from a piece symbol.
Creates a piece instance from a piece symbol .
def from_symbol(cls, symbol):
        """
        Creates a piece instance from a piece symbol.

        :raises ValueError: If the symbol is invalid.
        """
        if symbol.lower() == symbol:
            return cls(PIECE_SYMBOLS.index(symbol), BLACK)
        else:
            return cls(PIECE_SYMBOLS.index(symbol.lower()), WHITE)
def from_symbol ( cls , symbol ) : if symbol . lower ( ) == symbol : return cls ( PIECE_SYMBOLS . index ( symbol ) , BLACK ) else : return cls ( PIECE_SYMBOLS . index ( symbol . lower ( ) ) , WHITE )