Terry Reedy <[EMAIL PROTECTED]> wrote:
>
>Tim Roberts wrote:
>> Steven Howe <[EMAIL PROTECTED]> 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 )
>>>
>
Terry Reedy wrote:
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)
Having seen a number
Tim Roberts wrote:
Steven Howe <[EMAIL PROTECTED]> 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 clip
Steven Howe <[EMAIL PROTECTED]> 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.
What??
Python does
On Jul 17, 3:42 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> 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 a
Terry Reedy wrote:
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)
Having seen a number
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)
Having seen a number of comments like thi
The percent sign is a placeholder.
For example, if
level = 1
msg = 'look'
Then
'[[Log level %d: %s]]' % ( level, msg )
becomes
'[[Log level 1: look]]'
%d means insert an integer
%s means insert a string
You can also use dictionaries.
d = {'string1': 'hey', 'string2': 'you'}
Then
'%(string1)s %(
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:
h
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)
--
http://mail.python.org/mailman/listinfo/python-list
10 matches
Mail list logo