使用
e.args,
e.message已被弃用。
try: assert False, "Hello!"except AssertionError as e: e.args += ('some other', 'important', 'information', 42) raise这将保留原始的回溯。然后其最后一部分如下所示:
AssertionError: ('Hello!', 'some other', 'important', 'information', 42)在Python 2.7和Python 3中均可使用。



