fixing regex in python_syntax for def and class

fixing regex in python_syntax for def and class