Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35779 > unrolled thread
| Started by | Mitya Sirenef <msirenef@lightbird.net> |
|---|---|
| First post | 2012-12-29 15:59 -0500 |
| Last post | 2012-12-29 15:59 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Facing issue with Python loggin logger for printing object value Mitya Sirenef <msirenef@lightbird.net> - 2012-12-29 15:59 -0500
| From | Mitya Sirenef <msirenef@lightbird.net> |
|---|---|
| Date | 2012-12-29 15:59 -0500 |
| Subject | Re: Facing issue with Python loggin logger for printing object value |
| Message-ID | <mailman.1444.1356814788.29569.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web