On 07/17/12 12:29, Ethan Furman wrote: > Terry Reedy wrote: >> On 7/17/2012 10:23 AM, Lipska the Kat wrote: >> >>> Well 'type-bondage' is a strange way of thinking about compile time type >>> checking and making code easier to read (and therefor debug >> >> 'type-bondage' is the requirement to restrict function inputs and output >> to one declared type, where the type declaration mechanisms are usually >> quite limited. >> >> >>> def max(a, b): >> if a <= b: return a >> return b > > > Surely you meant 'if a >= b: . . .' > > No worries, I'm sure your unittests would have caught it. ;)
Or he could have meant "min" instead of "max". Or he could have returned the wrong values: def max(a, b): if a <= b: return b return a :-) -tkc -- http://mail.python.org/mailman/listinfo/python-list