Wrapping statements in Python in SPSS
Peter Otten
__peter__ at web.de
Fri Dec 28 12:07:39 EST 2012
alankrinsky at gmail.com wrote:
> I tried placing in the format you suggested and received this error
> message:
>
> END PROGRAM.
> Traceback (most recent call last):
> File "<string>", line 396, in <module>
> ValueError: incomplete format key
You seem to have a malformed format string. Example:
Correct:
>>> "Wonderful %(what)s" % dict(what="Spam")
'Wonderful Spam'
Broken (not the missing ')'):
>>> "Wonderful %(whats" % dict(what="Spam")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: incomplete format key
More information about the Python-list
mailing list