[Python-Dev] ',' precedence in documentation

Jason Orendorff jason.orendorff at gmail.com
Thu Sep 25 01:13:25 CEST 2008


What I really want is for the need to be less common.  What if assert
recognized certain commonly used expression types and actually
generated appropriate error messages?

  >>> assert foo.answer == 42
  AssertionError: expected foo.answer == 42; actual: 'a suffusion of yellow'

Maybe that's too magical.  :(  Failing that, I wish the message could
look sort of like a comment.

    assert cond || message

Yes, I know that symbol is used for something else in other languages...

-j


More information about the Python-Dev mailing list