From ad551cb28083dbb95ed15f37c26eb9c5e45cc23a Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 29 Oct 2005 03:26:51 +0000 Subject: [PATCH] Fix __init__ for BaseException to be completely backwards-compatible for 'args'. --- pep-0352.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pep-0352.txt b/pep-0352.txt index 45c41cd4e..dddbbfa03 100644 --- a/pep-0352.txt +++ b/pep-0352.txt @@ -63,12 +63,10 @@ will cause the deprecation of the existing ``args`` attribute):: """ - def __init__(self, message='', *args): + def __init__(self, *args): """Set 'message' and 'args' attribute""" - self.message = message - self.args = ((message,) + args - if message != '' - else tuple()) + self.args = args + self.message = args[0] if args else '' def __str__(self): """Return the str of 'message'"""