6:33cf8f66683a
Anton Shestakov <engored@ya.ru>, Mon, 15 Sep 2014 13:04:46 +0900
More on vim.

next change 8:9d27d58afcbb
previous change 3:b876b898560b

python.rst

Permissions: -rw-r--r--

Other formats: Feeds:
Column 1
========
Formatting %
------------
.. %, mapping, conversion, min width, precision, length, type
``%[(<name>)]`` *|* ``[#0- +][<min width 0-9*>][.<0-9*>][<length>]dioxXeEfFgGcrs``
``#``
the value conversion will use the “alternate form” (where defined below)
``0``
the conversion will be zero padded for numeric values
``-``
the converted value is left adjusted (overrides the '0' conversion if both
are given)
``␣``
(a space) a blank should be left before a positive number (or empty string)
produced by a signed conversion
``+``
a sign character ('+' or '-') will precede the conversion (overrides a
“space” flag)
``d`` ``i``
signed integer decimal
``o``
signed octal value
``x`` ``X``
signed hexadecimal *lowercase*, *uppercase*
``e`` ``E``
floating point exponential format *lowercase*, *uppercase*
``f`` ``F``
floating point decimal format
``g`` ``G``
floating point format. Uses *lowercase*, *uppercase* exponential format if
exponent is less than -4 or not less than precision, decimal format
otherwise
``c``
single character (accepts integer or single character string)
``r``
string (converts any Python object using repr())
``s``
string (converts any Python object using str())
Column 2
========
re Extensions
-------------
.. raw:: html
<div style="max-width: 600px;">
``(?iLmsux)``
the group matches the empty string; the letters set the corresponding flags
``(?:...)``
a non-capturing version of regular parentheses
``(?P<name>...)``
the substring matched by the group is accessible via the symbolic group
name
``(?P=name)``
matches whatever text was matched by the earlier named group named
(backreference)
``(?#...)``
the contents of the parentheses are simply ignored
``(?=...)``
lookahead assertion: matches next, but doesn't consume any of the string
``(?!...)``
negative lookahead assertion
``(?<=...)``
lookbehind assertion: matches a preceding string
``(?<!...)``
negative lookbehind assertion, patterns which start with it may match at
the beginning of the string being searched
.. break the list
``(?(id/name)yes-pattern|no-pattern)``
sorcery. ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)``
.. raw:: html
</div>