Home / Questions / Other AttributeError: 'NoneType' object has no attribute ... को कैसे debug करें? इसका मुख्य कारण क्या है? Other 0 Views Verified AttributeError: 'NoneType' object has no attribute ... को कैसे debug करें? इसका मुख्य कारण क्या है? #python #error #debugging #exception #solution Sarkari Result QA Bank Editorially reviewed exam information Share
Verified obj = None.method() obj = None.method() Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified obj.method() always without checking obj.method() always without checking Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified Correct Answer if obj is not None: obj.method() if obj is not None: obj.method() Additional Explanation None पर attribute/method access करने से पहले value check करें।