Chocolate [was Re: Python Books for 2002]

Rainer Deyke root at rainerdeyke.com
Thu Apr 12 13:07:44 EDT 2001


"Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
news:3AD50BB3.E71891A2 at cosc.canterbury.ac.nz...
> But the method of consumption depends on the class
> of the substance, so dispatching on it seems
> appropriate. Perhaps
>
>   substance.be_consumed_by(person)

Wrong!

fire = Fire()
substance.be_consumed_by(fire) # will fail


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list