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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com