% sign in python?
Robert Bossy
Robert.Bossy at jouy.inra.fr
Thu Jul 17 10:39:07 EDT 2008
korean_dave wrote:
> What does this operator do? Specifically in this context
>
> test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
>
> (Tried googling and searching, but the "%" gets interpreted as an
> operation and distorts the search results)
>
It's the string formatting operator:
http://docs.python.org/lib/typesseq-strings.html
Btw, a good place to start searching would be:
http://docs.python.org/lib/lib.html
especially:
http://docs.python.org/lib/genindex.html
Cheers
RB
More information about the Python-list
mailing list