How to improve this functional python trial division routine?
A functional recursive implementation:

def factorization(num, start=2):
    candidates = xrange(start, int(sqrt(num)) + 1)
    factor = next((x for x in candidates if num % x == 0), None)
    return ([factor] + factorization(num / factor, factor) if factor else [num])    

print factorization(1100)
#=&gt; [2, 2, 5, 5, 11]


Check this.