Encapsulation, inheritance and polymorphism
Ian
hobson42 at gmail.com
Tue Jul 17 14:59:09 EDT 2012
More information about the Python-list mailing list
Tue Jul 17 14:59:09 EDT 2012
- Previous message (by thread): Encapsulation, inheritance and polymorphism
- Next message (by thread): Encapsulation, inheritance and polymorphism
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 17/07/2012 19:43, Ethan Furman wrote: > Mark Lawrence wrote: >> On 17/07/2012 18: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. ;) >>> >>> ~Ethan~ >> >> Wouldn't the compiler have caught it before the unittests? :-) > > Silly me, the word processor would have caught it! > > ~Ethan~ No compiler can find as many faults as publishing your code on a mailing list!!! :) Ian
- Previous message (by thread): Encapsulation, inheritance and polymorphism
- Next message (by thread): Encapsulation, inheritance and polymorphism
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list