Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35779

Re: Facing issue with Python loggin logger for printing object value

Date 2012-12-29 15:59 -0500
From Mitya Sirenef <msirenef@lightbird.net>
Subject Re: Facing issue with Python loggin logger for printing object value
References (1 earlier) <50DF1D48.2060507@davea.name> <CAJ2vgs5j3+HYNWBd-3BN6p9hyDMG_5MmOrCKfodcMNzTg-OQUg@mail.gmail.com> <50DF241B.5070007@davea.name> <CAJ2vgs7L5Ye2WsP55EzQQm4iHVNvPH6-dieJGSrHpjtaOThVog@mail.gmail.com> <CAJ2vgs7aqL-Z1uaVq5E5AR8wgmtASEYO6+KT4v2z2q7p-jyGBw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1444.1356814788.29569.python-list@python.org> (permalink)

Show all headers | View raw


On 12/29/2012 03:50 PM, Morten Engvoldsen wrote:
> Hi Dave,
 > It is able to log the message with:
 > logger.debug("value of payment_line is " +repr(payment_line))
 >
 > The output is:
 > value of payment_line is []
 >
 > So it means payment_line is an empty list, so may be it could be 
reason it's not able to enter into the loop since the message in the for 
loop is not logged in the log file.
 >
 > Thanks and good night.. :)


You can easily test how iteration over empty list works:


>>> l=[]
 >>> for x in l: print(x)
...
>>>

i.e. nothing is printed because loop runs 0 times.


  -m



-- 
Lark's Tongue Guide to Python: http://lightbird.net/larks/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Facing issue with Python loggin logger for printing object value Mitya Sirenef <msirenef@lightbird.net> - 2012-12-29 15:59 -0500

csiph-web