The second argument is passed out in the exception.

The extended form, assert expression1, expression2, is equivalent to

if __debug__:
   if not expression1: raise AssertionError(expression2)



On Mon, May 26, 2014 at 11:05 PM, Daniel Halperin
<notifications@github.com>wrote:

> In raco/algebra.py:
>
> > @@ -159,7 +159,7 @@ def collectGraph(self, graph=None):
> >
> >      def resolveAttribute(self, ref):
> >          """Return a tuple of (column_name, type) for a given AttributeRef."""
> > -        assert isinstance(ref, expression.AttributeRef)
> > +        assert isinstance(ref, expression.AttributeRef), ref
>
> A few tests:
>
> Python 2.7.6 (default, Apr  9 2014, 11:48:52) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> assert 1, None>>> assert (1, None)<stdin>:1: SyntaxWarning: assertion is always true, perhaps remove parentheses?>>> assert 1, None>>> assert NoneTraceback (most recent call last):
>   File "<stdin>", line 1, in <module>AssertionError
>
> So I'm concerned that this change does nothing :p
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/uwescience/raco/pull/209/files#r13063067>
> .
>