Kless wrote:
On 10 ago, 15:03, Paddy <[EMAIL PROTECTED]> wrote:
If you just want the absense of _foo to raise an exception then why to
just reference self._foo and leave the hard work to ptyhon? Something
like:

  self._foo

If it is present then fine, if it is not then an exception is raised.

It only was an example but I need show a better message.

The usual idiom is
try: self._foo
except AttrError as m: #3.0
  <better message>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to