On this page
  1. locale.str
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

locale.str

Prev: locale.setlocale | Up: locale | Next: locale.strcoll
Rel: locale.atof, locale.atoi, locale.currency, locale.Error
Ref: docs.python.org — locale.str
Tags: #public #python3 #stdlib #locale


Import

import locale
from locale import str

Signature & Overview

locale.str(val)

Convert float to string, taking the locale into account.

Usage

import locale

assert locale.str(1.5) in ("1.5", "1,5")

Gotchas

REPL Inspect

from locale import str
help(str)

Linked from

Related notes