Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Facing issue with Python loggin logger for printing object value

Reply
Thread Tools

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

 
 
Mitya Sirenef
Guest
Posts: n/a
 
      12-29-2012
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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Facing issue with Python loggin logger for printing object value Chris Angelico Python 0 12-29-2012 12:53 PM
Re: Facing issue with Python loggin logger for printing object value Morten Engvoldsen Python 0 12-29-2012 12:39 PM
Re: Facing issue with Python loggin logger for printing object value Dave Angel Python 0 12-28-2012 06:59 PM
Re: Facing issue with Python loggin logger for printing object value Dave Angel Python 0 12-28-2012 03:39 PM
Facing issue with Python loggin logger for printing object value Morten Engvoldsen Python 0 12-28-2012 02:27 PM



Advertisments