Terry Reedy
3/11/2008 5:19:00 PM
"Robert Rawlins" <robert.rawlins@thinkbluemedia.co.uk> wrote in message
news:40727.816677145$1205243089@news.gmane.org...
| Thank you Simon,
|
| I was hoping there would be something as simple as that :-)
| >>> class Spam(object):
| ... def egg(self):
| ... if hasattr(self, 'chips'): print 'got chips!'
I strongly suggest that you read Library Reference Ch.2 on builtin
functions and types.