diff --git a/Basics/Exercise/16_class_and_objects/16_class_and_objects.py b/Basics/Exercise/16_class_and_objects/16_class_and_objects.py index 4893cabc..06df70fa 100644 --- a/Basics/Exercise/16_class_and_objects/16_class_and_objects.py +++ b/Basics/Exercise/16_class_and_objects/16_class_and_objects.py @@ -17,7 +17,7 @@ def display(self): # Deleting the object itself try: print(emp.id) -except NameError: +except AttributeError: print("emp.id is not defined") del emp