#NEWLINE# @ cacheit #NEWLINE# def _nT( n , k ) : #NEWLINE# #INDENT# 'Return the partitions of ``n`` items into ``k`` parts. This\n    is used by ``nT`` for the case when ``n`` is an integer.' #NEWLINE# if ( k == 0 ) : #NEWLINE# #INDENT# return ( 1 if ( k == n ) else 0 ) #NEWLINE# #UNINDENT# return sum ( ( _nT ( ( n - k ) , j ) for j in range ( ( min ( k , ( n - k ) ) + 1 ) ) ) )