Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find Python compilation / runtime error before running

Consider the following:

def func_a(param1,param2):
    print (param1 + param2)

func_a("a")

func_a expects two parameters, whereas it is called with only one. In other languages this kind of error is discovered while coding or compiling.

Is it possible to find this Python coding error before runtime?

like image 359
OJNSim Avatar asked Jul 26 '26 13:07

OJNSim


1 Answers

@eliKorvigo comment(s) answer the questions. PyCharm Inspect code provide the option of finding (possible) error before runtime.

like image 98
OJNSim Avatar answered Jul 29 '26 04:07

OJNSim