`if cov_func is None:` ? I don't know if it really makes any difference, but see this stackoverflow post: http://stackoverflow.com/questions/3257919/is-none-vs-none