% sign in python?
Terry Reedy
tjreedy at udel.edu
Fri Jul 18 03:45:58 EDT 2008
Tim Roberts wrote:
> Steven Howe <howe.steven at gmail.com> wrote:
>
>> Terry Reedy wrote:
>>> korean_dave wrote:
>>>> What does this operator do? Specifically in this context
>>>>
>>>> test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
>> I thought, in this contexted, it was mapping operator.
You miss clipped. I never wrote that. Please be careful, especially
about attributing mis-information.
> What??
>
> Python does not have a "mapping operator". It has a "map" function, but no
> equivalent operator.
>
> % is either the string formatting operator (when the left-hand operand is a
> string) or the modulo operator (when the left-hand operand is a number).
Which I learned 10 years ago. What I did write was a pre-announcement
of a Python symbol glossary, which I just finished a first draft of.
And now to bed ;-)
More information about the Python-list
mailing list