Pelokalan
Python ID
id en
Masuk
Proyek
reference__executionmodel.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
:term:`Annotations <annotation>`, :ref:`type parameter lists <type-params>` and :keyword:`type` statements introduce *annotation scopes*, which behave mostly like function scopes, but with some exceptions discussed below.
Exceptions
Pengecualian
Exceptions are a means of breaking out of the normal flow of control of a code block in order to handle errors or other exceptional conditions. An exception is *raised* at the point where the error is detected; it may be *handled* by the surrounding code block or by any code block that directly or indirectly invoked the code block where the error occurred.
Exceptions are identified by class instances. The :keyword:`except` clause is selected depending on the class of the instance: it must reference the class of the instance or a :term:`non-virtual base class <abstract base class>` thereof. The instance can be received by the handler and can carry additional information about the exceptional condition.