Martin wrote:
...
class MailAddress(object):
  def __init__(self, address=None):
    self.address = address
  def __str__(self):
    if address:
      return self.adress
    return "NULL"

There is an obvious typo above:
>     if address:
should be:
      if self.address:

Or, you could replace the __str__ function with:
    def __str__(self):
        return self.address or "NULL"

--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to