From fe386150e10328c0a4f5fd2688a399e352a8f613 Mon Sep 17 00:00:00 2001 From: Kumar Mohit Date: Mon, 18 Nov 2024 17:50:14 +0530 Subject: [PATCH] Update 7.1-exception.ipynb In the very third cell from bottom u typed but here there won't be any parenthesis as closed is not a method but a property which returns boolean value. And its not throwing error bcoz it is not getting executed as u have used or operator. --- 7-Exception Handling/7.1-exception.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7-Exception Handling/7.1-exception.ipynb b/7-Exception Handling/7.1-exception.ipynb index 14aac5c0..0ba94b39 100644 --- a/7-Exception Handling/7.1-exception.ipynb +++ b/7-Exception Handling/7.1-exception.ipynb @@ -242,7 +242,7 @@ " print(ex)\n", "\n", "finally:\n", - " if 'file' in locals() or not file.closed():\n", + " if 'file' in locals() or not file.closed:\n", " file.close()\n", " print('file close')" ]