pformat_parse: Preparses a format string

Description Usage Arguments Details Value Examples

Description

Parses a format string into an internal representation compatible with pformat().

Usage

1
pformat_parse(format_string)

Arguments

format_string

the format string

Details

This function actually only parses a "layer" of the format string markup. Recursive format strings depend on data, and thus can't be completely parsed yet. In these cases, pformat_parse() will still be called by pformat() with format specifications needing expanding.

Value

an object of class pformat.compiled containing an internal representation of the format string.

Examples

1
2
pformat_parse("{} {}")
pformat_parse("{1} {2}")

lurodrigo/pformat documentation built on May 21, 2019, 8:58 a.m.