pylint #113023 Add support for raise (type, value, traceback) [open]

There are various ways of raising an exception in Python and pylint only supports some of them. This case fails:

pablo@eulogia:/tmp$ cat abc.py
import sys

try:
raise KeyboardInterrupt
except:
tb = sys.exc_info()[2]
raise (TypeError, "New description.", tb)

pablo@eulogia:/tmp$
pablo@eulogia:/tmp$ pylint -E abc.py
No config file found, using default configuration
************* Module abc
E: 7,4: Raising tuple while only classes, instances or string are allowed
pablo@eulogia:/tmp$ python abc.py
Traceback (most recent call last):
File "abc.py", line 7, in <module>
raise (TypeError, "New description.", tb)
TypeError
pablo@eulogia:/tmp$ pylint --version
No config file found, using default configuration
pylint 0.25.0,
astng 0.23.0, common 0.57.1
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3]

As you can see, pylint shows an error (E: 7,4: Raising tuple while only classes, instances or string are allowed) while Python happily raises the TypeError exception with the provided data.

prioritynormal
typebug
appeared in<not specified>
done in<not specified>
load1.100
load left1.100
closed by<not specified>