Re: % sign in python?

2008-07-20 Thread Tim Roberts
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 ) >>> >

Re: % sign in python?

2008-07-18 Thread Ken Starks
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

Re: % sign in python?

2008-07-18 Thread Terry Reedy
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

Re: % sign in python?

2008-07-17 Thread Tim Roberts
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

Re: % sign in python?

2008-07-17 Thread Jordan
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

Re: % sign in python?

2008-07-17 Thread Steven Howe
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

Re: % sign in python?

2008-07-17 Thread Terry Reedy
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

Re: % sign in python?

2008-07-17 Thread Roy H. Han
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 %(

Re: % sign in python?

2008-07-17 Thread Robert Bossy
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

% sign in python?

2008-07-17 Thread korean_dave
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