I probalby made a mistake with the patch. 
The new attached one is correct. 
It ads a single line in lisp/progmodes/python.el.