On Wed, Apr 27, 2016, at 10:32 PM, Ben Finney wrote: > Stephen Hansen <me+pyt...@ixokai.io> writes: > > > The error message means there's a mismatch between the number of > > formatting instructions (ie, %s) and arguments passed to formatting. I > > leave it to you to count and find what's missing or extra, because I'm > > seriously not going to do that :) > > Better: when you have many semantically-different values, use named (not > positional) parameters in the format string. > > Some simple format string examples: > > "First, thou shalt count to {0}" # References first positional > argument > "Bring me a {}" # Implicitly references the first > positional argument > "From {} to {}" # Same as "From {0} to {1}" > "My quest is {name}" # References keyword argument 'name' > […] > > <URL:https://docs.python.org/3/library/string.html#formatstrings>
Except the poster is not using Python 3, so all of this is for naught. -- Stephen Hansen m e @ i x o k a i . i o -- https://mail.python.org/mailman/listinfo/python-list