notation indicates which argument(s) should be processed by the operation:
the default is `=+'.
"""
+ if not isinstance(control, basestring): return control
pp = []
with COMPILE.bind(control = control, start = 0, end = len(control),
delim = ''):
raise TypeError, out
## Turn the control argument into a formatting operation.
- if isinstance(control, basestring):
- op = compile(control)
- else:
- op = control
+ op = compile(control)
## Invoke the formatting operation in the correct environment.
with FORMAT.bind(write = write, pushback = [],
then the enclosed directives are applied once even if the argument sequence
is empty.
- If the formatting directives are empty then a formatting string is fetched
+ If the formatting directives are empty then a formatting control is fetched
using the argument collector associated with the closing delimiter.
"""
"""
~?: Recursive formatting.
- Without `@', read a pair of arguments: use the first as a format string,
+ Without `@', read a pair of arguments: use the first as a format control,
and apply it to the arguments extracted from the second (which may be a
sequence or a map).