Chocolate [was Re: Python Books for 2002]

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Apr 10 22:54:09 EDT 2001


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()

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list