
kr.motd.maven.sphinx.dist.babel.units$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1} f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; org/python/core/PyFrame setline (I)V
babel._compat java/lang/String string_types
org/python/core/imp
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject;
setlocal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
babel.core Locale
babel.numbers format_decimal
LC_NUMERIC ! org/python/core/PyObject #
ValueError % getname .(Ljava/lang/String;)Lorg/python/core/PyObject; ' (
) UnknownUnitError + UnknownUnitError$1
__module__ . __name__ 0 org/python/core/Py 2 EmptyObjects [Lorg/python/core/PyObject; 4 5 3 6 org/python/core/PyFunction 8 f_globals Lorg/python/core/PyObject; : ; <
__init__$2 getglobal ? (
@ __init__ B __getattr__ D (
$ E getlocal (I)Lorg/python/core/PyObject; G H
I %s is not a known unit in %s K org/python/core/PyString M fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString; O P
N Q org/python/core/PyTuple S ([Lorg/python/core/PyObject;)V U V
T W _mod 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; Y Z
$ [ __call__ m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ^
$ _ f_lasti I a b c None e ; 3 f babel/units$py h Lorg/python/core/PyCode; > j i k j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V U m
9 n getf_locals ()Lorg/python/core/PyObject; p q
r - j i t makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject; v w
3 x java/util/Arrays z fill (([Ljava/lang/Object;Ljava/lang/Object;)V | }
{ ~ long ? get_unit_name$3?
Get the display name for a measurement unit in the given locale.
>>> get_unit_name("radian", locale="en")
'radians'
Unknown units will raise exceptions:
>>> get_unit_name("battery", locale="fi")
Traceback (most recent call last):
...
UnknownUnitError: battery/long is not a known unit/length in fi
:param measurement_unit: the code of a measurement unit.
Known units can be found in the CLDR Unit Validity XML file:
http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
:param length: "short", "long" or "narrow"
:param locale: the `Locale` object or locale identifier
:return: The unit display name, or None.
? parse ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ?
$ ? (ILorg/python/core/PyObject;)V ?
? _find_unit_pattern ? locale ? g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; ] ?
$ ? __not__ ? q
$ ? __nonzero__ ()Z ? ?
$ ? unit ?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException; ? ?
3 ? unit_display_names ? get ? org/python/core/PyDictionary ?
? W ? j i ?
get_unit_name ? _find_unit_pattern$4?
Expand an unit into a qualified form.
Known units can be found in the CLDR Unit Validity XML file:
http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
>>> _find_unit_pattern("radian", locale="en")
'angle-radian'
Unknown values will return None.
>>> _find_unit_pattern("horse", locale="en")
:param unit_id: the code of a measurement unit.
:return: A key to the `unit_patterns` mapping, or None.
? _data ?
unit_patterns ? __getitem__ ? Z
$ ? _in ? Z
$ ? sorted ? len ? key ? __iter__ ? q
$ ? endswith ? __iternext__ ? q
$ ? ? j i ? e
format_unit$5?Format a value of a given unit.
Values are formatted according to the locale's usual pluralization rules
and number formats.
>>> format_unit(12, 'length-meter', locale='ro_RO')
u'12 metri'
>>> format_unit(15.5, 'length-mile', locale='fi_FI')
u'15,5 mailia'
>>> format_unit(1200, 'pressure-inch-hg', locale='nb')
u'1\xa0200 tommer kvikks\xf8lv'
Number formats may be overridden with the ``format`` parameter.
>>> from babel._compat import decimal
>>> format_unit(decimal.Decimal("-42.774"), 'temperature-celsius', 'short', format='#.0', locale='fr')
u'-42,8 \xb0C'
The locale's usual pluralization rules are respected.
>>> format_unit(1, 'length-meter', locale='ro_RO')
u'1 metru'
>>> format_unit(0, 'length-picometer', locale='cy')
u'0 picometr'
>>> format_unit(2, 'length-picometer', locale='cy')
u'2 bicometr'
>>> format_unit(3, 'length-picometer', locale='cy')
u'3 phicometr'
>>> format_unit(15, 'length-horse', locale='fi')
Traceback (most recent call last):
...
UnknownUnitError: length-horse is not a known unit in fi
.. versionadded:: 2.2.0
:param value: the value to format. If this is a string, no number formatting will be attempted.
:param measurement_unit: the code of a measurement unit.
Known units can be found in the CLDR Unit Validity XML file:
http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
:param length: "short", "long" or "narrow"
:param format: An optional format, as accepted by `format_decimal`.
:param locale: the `Locale` object or locale identifier
?
isinstance ? one ? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ?
$ ? plural_form ? format ? %s %s ? length ? ? j i ? format_unit ? _find_compound_unit$6?
Find a predefined compound unit pattern.
Used internally by format_compound_unit.
>>> _find_compound_unit("kilometer", "hour", locale="en")
'speed-kilometer-per-hour'
>>> _find_compound_unit("mile", "gallon", locale="en")
'consumption-mile-per-gallon'
If no predefined compound pattern can be found, `None` is returned.
>>> _find_compound_unit("gallon", "mile", locale="en")
>>> _find_compound_unit("horse", "purple", locale="en")
:param numerator_unit: The numerator unit's identifier
:param denominator_unit: The denominator unit's identifier
:param locale: the `Locale` object or locale identifier
:return: A key to the `unit_patterns` mapping, or None.
:rtype: str|None
? split ? - ?
newInteger (I)Lorg/python/core/PyInteger; ? ?
3 ? %s-per-%s ? ? j i ? _find_compound_unit ? format_compound_unit$7?
Format a compound number value, i.e. "kilometers per hour" or similar.
Both unit specifiers are optional to allow for formatting of arbitrary values still according
to the locale's general "per" formatting specifier.
>>> format_compound_unit(7, denominator_value=11, length="short", locale="pt")
'7/11'
>>> format_compound_unit(150, "kilometer", denominator_unit="hour", locale="sv")
'150 kilometer per timme'
>>> format_compound_unit(150, "kilowatt", denominator_unit="year", locale="fi")
'150 kilowattia vuodessa'
>>> format_compound_unit(32.5, "ton", 15, denominator_unit="hour", locale="en")
'32.5 tons per 15 hours'
>>> format_compound_unit(160, denominator_unit="square-meter", locale="fr")
'160 par m\xe8tre carr\xe9'
>>> format_compound_unit(4, "meter", "ratakisko", length="short", locale="fi")
'4 m/ratakisko'
>>> format_compound_unit(35, "minute", denominator_unit="fathom", locale="sv")
'35 minuter per famn'
>>> from babel.numbers import format_currency
>>> format_compound_unit(format_currency(35, "JPY", locale="de"), denominator_unit="liter", locale="de")
'35\xa0\xa5 pro Liter'
See http://www.unicode.org/reports/tr35/tr35-general.html#perUnitPatterns
:param numerator_value: The numerator value. This may be a string,
in which case it is considered preformatted and the unit is ignored.
:param numerator_unit: The numerator unit. See `format_unit`.
:param denominator_value: The denominator value. This may be a string,
in which case it is considered preformatted and the unit is ignored.
:param denominator_unit: The denominator unit. See `format_unit`.
:param length: The formatting length. "short", "long" or "narrow"
:param format: An optional format, as accepted by `format_decimal`.
:param locale: the `Locale` object or locale identifier
:return: A formatted compound value.
? _eq ? Z
$ ? per ? ? strip ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; ] ?
$ ? compound_unit_patterns {0}/{1} ? j i format_compound_unit (Ljava/lang/String;)V org/python/core/PyFunctionTable ()V U
self Lbabel/units$py; i newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;
3 j i measurement_unit unit_id unit_pattern value! q_unit# formatted_value% numerator_unit' denominator_unit) bare_numerator_unit+ bare_denominator_unit- numerator_value/ denominator_value1
compound_unit3 formatted_numerator5 formatted_denominator7 per_pattern9 getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V h U
i@;<
iB org/python/core/CodeLoaderD createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;FG
EH runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)VJK
3L getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrapP )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;RS
QT
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
iX -
iZ >
i\ ?
i^ ?
i` ?
ib ?
id ?
if org/python/core/PyRunnableh Lorg/python/compiler/APIVersion; % Lorg/python/compiler/MTime; `?e3 Lorg/python/compiler/Filename; U/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/babel/units.py org/python/core/ThreadStateq [Ljava/lang/String;s java/lang/Objectu 5 Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! i
i j - j > j ? j ? j ? j ? j ? j
x Z "+?
? N-S-+? N-2:+? :+? ? N-S-+? N-2:+? :+? ? N- S-"S-+? N-2:+ ? :-2:+"? :+? ? $N+&? *-__S,-? u? y:+,? :-? +
? ? $N?? R-__S+"? *-__S? 9Y+? =-? ??? R? oN+?-? N+*? ? $N+"? *-__S? 9Y+? =-? ??? R? oN+?-? N+D? ? $N?? R-__S+ɶ *-__S+"? *-__S? 9Y+? =-? ?̸ R? oN+?-? N+ ?? ? $N+"? *-__S? 9Y+? =-? ?? R? oN+?-? N+ ?? ? $N+ɶ *-__S? ?-__S+ɶ *-__S?? R-__S+ɶ *-__S+"? *-__S? 9Y+? =-?? R? oN+-? N+? d? g? y &