About 600 results
Open links in new tab
  1. Built-in Exceptions — Python 3.14.2 documentation

    2 days ago · User code can raise built-in exceptions. This can be used to test an exception handler or to report an error condition “just like” the situation in which the interpreter raises the …

  2. 8. Errors and Exceptions — Python 3.14.2 documentation

    3 days ago · Errors detected during execution are called exceptions and are not unconditionally fatal: you will soon learn how to handle them in Python programs. Most exceptions are not …

  3. contextlib — Utilities for with-statement contexts - Python

    2 days ago · It is occasionally desirable to catch exceptions from an __enter__ method implementation, without inadvertently catching exceptions from the with statement body or the …

  4. The Python Standard Library — Python 3.14.2 documentation

    3 days ago · The library contains built-in modules (written in C) that provide access to system functionality such as file I/O that would otherwise be inaccessible to Python programmers, as …

  5. Exception Handling — Python 3.14.2 documentation

    2 days ago · The functions described in this chapter will let you handle and raise Python exceptions. It is important to understand some of the basics of Python exception handling.

  6. 4. Execution model — Python 3.14.2 documentation

    2 days ago · The Python interpreter raises an exception when it detects a run-time error (such as division by zero). A Python program can also explicitly raise an exception with the raise …

  7. 1. Extending Python with C or C++ — Python 3.14.2 documentation

    2 days ago · There are predeclared C objects corresponding to all built-in Python exceptions, such as PyExc_ZeroDivisionError, which you can use directly. Of course, you should choose …

  8. 8. Compound statements — Python 3.14.2 documentation

    2 days ago · Before an except clause’s suite is executed, the exception is stored in the sys module, where it can be accessed from within the body of the except clause by calling …

  9. Introduction — Python 3.14.2 documentation

    2 days ago · There are a number of functions to set the exception state: PyErr_SetString() is the most common (though not the most general) function to set the exception state, and …

  10. logging — Logging facility for Python — Python 3.14.2 …

    In versions of Python prior to 2.7.1 and 3.2, if this function is called from multiple threads, it is possible (in rare circumstances) that a handler will be added to the root logger more than …