py wrote:
> Dan Sommers wrote:
> 
>>Just do it.  If one of foo's callers passes in a non-iterable, foo will
>>raise an exception, and you'll catch it during testing
> 
> That's exactly what I don't want.  I don't want an exception, instead I
> want to check to see if it's an iterable....if it is continue, if not
> return an error code. 

Why return an error code? Just pass along the exception (i.e. do nothing
special). Python's exception mechanism is far superior to error codes.
Don't try to fight the language.

> I can't catch it during testing since this is
> going to be used by other people.

Then *they'll* catch it during testing.

-- 
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

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

Reply via email to