Part 2: assert, raise, with as & custom exception handling in Python in Hindi

Part 2: assert, raise, with as & custom exception handling in Python in Hindi

🎙 Artificial Intelligence by SIS 👥 7K 📅 April 15, 2026 ⏱ 35 min 👁 19 📄 tutorial 🧭 2026-08-16
Available in: English (current) Français

Keywords

assertraisewith ascustom exceptionPython

Summary

This tutorial, presented in Hindi, is the second part of a series on exception handling in Python. It begins by reviewing the concept of exceptions and the try-except block, then introduces the ‘raise’ keyword for manually triggering exceptions, including using built-in exception classes and creating custom exception classes by subclassing the Exception class. The tutorial demonstrates various examples, such as raising exceptions based on conditions and re-raising exceptions. It then explains the ‘assert’ statement for testing conditions and how it can be used for debugging, including the use of the debug flag and the -O command-line option to disable assertions. The latter half of the video focuses on context managers, specifically the ‘with as’ statement, which automatically manages resources like files, ensuring they are closed properly. The tutorial shows how to use ‘with as’ for file reading and writing, including multiple context managers in a single line. Throughout, the instructor provides code examples and runs them to illustrate the concepts. The video is aimed at students and developers learning Python, and it offers source code for download.

177 words

Critical Evaluation

Value of the Information & Strength of the Argument

The video provides a solid introduction to advanced exception handling techniques in Python. The explanations are clear and accompanied by practical examples that demonstrate the concepts effectively. The instructor builds on previous knowledge and shows real-world applications, such as validating payment amounts and managing file resources. The argumentation is logical and progressive, making it easy for viewers to follow. However, the video could benefit from discussing potential pitfalls, such as the performance impact of assertions or best practices for custom exceptions. Overall, the content is valuable for learners seeking to deepen their understanding of Python’s error handling.

Scientific Rigor, Source Quality, Title Accuracy

The tutorial is scientifically rigorous in that it adheres to Python’s official documentation and standard practices. The instructor provides a link to the source code, which enhances transparency and allows viewers to verify the examples. The title accurately describes the content, which is focused on specific exception handling features. The video does not cite external sources, but it is based on well-established programming concepts. The quality of the presentation is good, with clear audio and visual aids, though the lack of chapters may make navigation less convenient. Overall, the content is reliable and well-structured.

206 words

Title / Content Match

The title accurately reflects the content, which covers assert, raise, with as, and custom exception handling in Python.

Quality & Reliability

7/10

The tutorial is technically accurate and follows standard Python documentation. It provides clear examples and explanations, but lacks in-depth discussion of edge cases and best practices. The source code is available for download, enhancing reliability.

Key Moments

Cited Sources

Concurring Sources

Contribution & Novelties

This tutorial offers a clear and practical guide to advanced exception handling in Python, specifically focusing on the raise, assert, and with as statements, as well as custom exceptions. It is particularly useful for Hindi-speaking learners, as it explains these concepts in Hindi, making them more accessible. The video includes multiple examples and demonstrates real-world scenarios, such as file handling and input validation. It also covers the use of the debug flag and the -O option, which are often overlooked in introductory tutorials.

Pour aller plus loin :

125 words

Radar Profile

The radar profile shows high scores in quantity of information and reliability, indicating a comprehensive and trustworthy tutorial. The technical level is moderate, suitable for beginners, while the quality of information is good. The overall balance suggests a solid educational resource.

Reliability 7/10

💬 Sur les 0 commentaires analysés, aucune tendance n'est disponible.