Public int getIndex (): Get the wrong index.
Public String getPattern (): Gets the error regular expression in the form of a string.
Public String getMessage (): Get a multi-line string, including syntax errors and wrong indexes, wrong regular expression patterns, and visual index indications in the patterns.
Explanatory:
Programs written in compilation languages such as C or C++ can be converted from source files (that is, C or C++ languages) into languages used by your computer (binary codes, that is, 0 and 1). This process is done by the compiler and different labels and options.
When running the program, the linker/loader software copies your program from the hard disk to the memory and runs it. Programs written in Python language do not need to be compiled into binary code. You can run the program directly from the source code.
Object-oriented: Python supports both process-oriented programming and object-oriented programming. In a "process-oriented" language, a program is built by a process or just a function of reusable code. In the "object-oriented" language, programs are built by objects composed of data and functions.