On this page
  1. locale.Error
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

locale.Error

Prev: locale.currency | Up: locale | Next: locale.format_string
Rel: locale.atof, locale.atoi, locale.currency, locale.format_string
Ref: docs.python.org โ€” locale.Error
Tags: #public #python3 #stdlib #locale


Import

import locale
from locale import Error

Signature & Overview

locale.Error(...)

locale.Error class.

Methods & Attributes

Usage

import locale

try:
    locale.setlocale(locale.LC_ALL, "nonexistent_locale_xyz")
except locale.Error:
    assert True

Gotchas

REPL Inspect

from locale import Error
help(Error)

Linked from

Related notes