Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Facing issue with Python loggin logger for printing object value (http://www.velocityreviews.com/forums/t955949-re-facing-issue-with-python-loggin-logger-for-printing-object-value.html)

Mitya Sirenef 12-29-2012 08:59 PM

Re: Facing issue with Python loggin logger for printing object value
 
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/



All times are GMT. The time now is 08:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.