Exception.args
is a descriptor; it hooks __set__
to turn anything you assign to self.args
into a tuple.
So, as soon as you assign your list to self.args
, the descriptor converts it back to a tuple. It's not that your list()
call failed, it's just that Exception.args
is special.
BaseException.args
is documented to be a tuple, and in Python 2, exception objects support slicing:
>>> ex = Exception(1, 2)
>>> ex.args
(1, 2)
>>> ex[0]
1
Exceptions are also supposed to be immutable; keeping the .args
attribute a tuple helps keep them so. Moreover, the __str__
handler for exceptions expects .args
to be a tuple, and setting it to something else has led to strange bugs in the past.