Yo All! Yet another undocumented Python failure:
i>>> d = {}
>>> d[1] = "one"
>>> d[2] = "two"
>>> str(d[2])
'two'
>>> echo "%s(d[2])s" % locals
File "<stdin>", line 1
echo "%s(d[2])s" % locals
^
SyntaxError: invalid syntax
Python says %s(x)s works for any x that str(x) works.
Here is the Python doc:
https://docs.python.org/2.7/library/stdtypes.html#string-formatting
"'s' String (converts any Python object using str())."
WRONG!
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
[email protected] Tel:+1 541 382 8588
pgpGAwwVttFBr.pgp
Description: OpenPGP digital signature
_______________________________________________ devel mailing list [email protected] http://lists.ntpsec.org/mailman/listinfo/devel
