Feb-19-2020, 07:01 AM
Hi,
I have the code
While I am running pylint/pyflakes/flake8 I don't get any error about attribute error.
What can I do to find that error without running the code
Thanks,
Yoni
I have the code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
class MainC: def __init__( self ): self .arg1 = None # Method One, Not working OBJ_LIST = {} for i in range ( 10 ): OBJ_LIST[i] = MainC() for i in range ( 10 ): print (OBJ_LIST[i].arg2) # There is a error here # Method Two, Also not working OBJ_LIST = [] for i in range ( 10 ): OBJ_LIST.append(MainC()) for i in range ( 10 ): print (OBJ_LIST[i].arg2) # There is a error here |
What can I do to find that error without running the code
Thanks,
Yoni