Chocolate [was Re: Python Books for 2002]

Ben Wolfson wolfson at uchicago.edu
Wed Apr 11 00:40:12 EDT 2001


In article <3AD3C751.CF669272 at cosc.canterbury.ac.nz>, "Greg Ewing"
<greg at cosc.canterbury.ac.nz> wrote:

> Simon Brunning wrote:
>> 
>> from Europe.England import beer
>> 
>> >   for food in dir():
>> >     if food[:2] != '_':
>> >       eat(food)
> 
> But beer has to be drunk, not eaten, so you'll need
> 
>   for comestible in dir():
>     if comestible[:2] != '_':
>       comestible.consume()
 
But this is bad design, since the comestible doesn't consume anything,
but is consumed by an eater.  Something like

from Animals.Mammals import Human

hungry_person = Human()

So that the hungry_person can .consume() the comestibles.

Besides, the OED seems to be telling me (I can't tell because the web
site's design is confusing) that "comestible" refers only to things one
eats anyway.

-- 
Barnabas T. Rumjuggler
The women come and go,
Speaking of the Regis Philbin Show
 -- Joe Frank



More information about the Python-list mailing list