format.py: Document `#' as a format parameter.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 10 Apr 2017 13:28:14 +0000 (14:28 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 10 Apr 2017 13:28:14 +0000 (14:28 +0100)
It's standard Common Lisp, but was unaccountably left out of the
documentation.

format.py

index d6eb896..af76c59 100644 (file)
--- a/format.py
+++ b/format.py
@@ -798,7 +798,7 @@ def compile(control):
 
   PARAMS ::= PARAM [`,' PARAMS]
 
-  PARAM ::= EMPTY | INT | `'' CHAR | `v' | `!' ARG
+  PARAM ::= EMPTY | INT | `#' | `'' CHAR | `v' | `!' ARG
 
   FLAGS ::= [[ `@' | `:' ]]*
 
@@ -806,11 +806,11 @@ def compile(control):
   items drawn from the listed alternatives, each appearing at most once.  See
   the function `parse_arg' for the syntax of ARG.)
 
-  An empty PARAM is equivalent to omitting the parameter; `!ARG' reads the
-  parameter value from the argument; `v' is equivalent to `!+', as a
-  convenient abbreviation and for Common Lisp compatibility.  The `=ARG'
-  notation indicates which argument(s) should be processed by the operation:
-  the default is `=+'.
+  An empty PARAM is equivalent to omitting the parameter; `#' is the number
+  of remaining positional arguments; `!ARG' reads the parameter value from
+  the argument; `v' is equivalent to `!+', as a convenient abbreviation and
+  for Common Lisp compatibility.  The `=ARG' notation indicates which
+  argument(s) should be processed by the operation: the default is `=+'
   """
   if not isinstance(control, basestring): return control
   pp = []