Pelokalan
Python ID
id en
Sign in
Project
library__warnings.po Project files · python-docs-id-3.14 · Bahasa Indonesia
Module PO View only
Source text — English
Translation — Bahasa Indonesia
:exc:`UserWarning`
:exc:`UserWarning`
Issue a warning, or maybe ignore it or raise an exception. The *category* argument, if given, must be a :ref:`warning category class <warning-categories>`; it defaults to :exc:`UserWarning`. Alternatively, *message* can be a :exc:`Warning` instance, in which case *category* will be ignored and ``message.__class__`` will be used. In this case, the message text will be ``str(message)``. This function raises an exception if the particular warning issued is changed into an error by the :ref:`warnings filter <warning-filter>`. The *stacklevel* argument can be used by wrapper functions written in Python, like this::