On Tue, Feb 5, 2013 at 3:52 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > There's also the principle that it is best to raise an exception as early > as possible. It's easier to track down errors at the point they are > introduced than long afterwards.
Yes, definitely, especially (as was mentioned) if you're working with callbacks. But I'd use isinstance then. ChrisA -- http://mail.python.org/mailman/listinfo/python-list