fitting brinance to python