“class“ object is not subscriptable

When writing python3 code, when running,
an error is reported. This class object is not subscriptible
reports that it has no subscript, but when the subscript is used, check the code carefully. Sure enough,
there is a place where I want to use the attribute under the class. I am not “dot”, but []
which causes this error. I must check patiently where this class attribute is used

if job.mode == value or job['mode'] == value:

go through

if job.mode == value or job.mode == value

Read More: