• + 1 comment

    I set the value to None (Python 3) and set the max_value the first time it is calculated. Others have suggested that setting the value to -63 (7 * -9) is sufficient, which it is, but what happens when the spec changes (real world) and now we need to reset the initial max_value to whatever the lowest possible value could be.

    integer.MIN_VALUE works as well. Generally I am against 'magic numbers' so None or the absolute lowest known value make the solution more scalable IMHO.