Grid/__init__.py
def diagonal_generator(n : int):
    '''
    diagonal_generator
    ==================
    Generate the coordinates for the diagonals.

    Parameters
    ----------
    n : int
        the number of rows and columns of the square matrix.
    
    Returns
    -------
    A generator producing diagonal coordinates.
    '''
    return (
        (a, b) 
        for a in range(2*n-1)
        for b in ( range(0,a+1) if a < n else  range(0, 2*n-a -1) )
    )

    diagonal_generator
    ==================
    Generate the coordinates for the diagonals.

    Parameters
    ----------
    n : int
        the number of rows and columns of the square matrix.
    
    Returns
    -------
    A generator producing diagonal coordinates.
    
diagonal_generator
Generate the coordinates for the diagonals.

Parameters

n : int
the number of rows and columns of the square matrix.

Returns

A generator producing diagonal coordinates.
diagonal_generator Generate the coordinates for the diagonals . Parameters n : int the number of rows and columns of the square matrix . Returns A generator producing diagonal coordinates .
def diagonal_generator(n : int):
    return (
        (a, b) 
        for a in range(2*n-1)
        for b in ( range(0,a+1) if a < n else  range(0, 2*n-a -1) )
    )
def diagonal_generator ( n : int ) : return ( ( a , b ) for a in range ( 2 * n - 1 ) for b in ( range ( 0 , a + 1 ) if a < n else range ( 0 , 2 * n - a - 1 ) ) )
diagonal_generator
Generate the coordinates for the diagonals.
diagonal_generator Generate the coordinates for the diagonals .
'''
    diagonal_generator
    ==================
    Generate the coordinates for the diagonals.

    Parameters
    ----------
    n : int
        the number of rows and columns of the square matrix.
    
    Returns
    -------
    A generator producing diagonal coordinates.
    '''
n
int