print(....,file=sys.stderr) buffered?
Alain Ketterlin
alain at dpt-info.u-strasbg.fr
Tue Aug 14 05:06:31 EDT 2012
Helmut Jarausch <jarausch at skynet.be> writes:
> On Mon, 13 Aug 2012 15:43:31 +0000, Grant Edwards wrote:
>
>> On 2012-08-13, Helmut Jarausch <jarausch at skynet.be> wrote:
>>> Hi,
>>>
>>> for tracing purposes I have added some print outs like
>>>
>>> print('+++ before calling foo',file=sys.stderr)
>>> x=foo(..)
>>> print('--- after calling foo',
>
> Sorry, this is a cut'n paste error. I did use
> print('--- after calling foo',file=sys.stderr)
>
>>>
>>> and within 'foo'
>>> print('>>> entering foo ...',file=sys.stderr)
>>>
>>> Now, when executing this, I always get
>>>
>>> +++ before calling foo
>>> --- after calling foo
>>>>>> entering foo ...
This can't happen with "normal" code. Are you playing with lambdas or
generators here? Or anything else that could introduce lazyness?
-- Alain.
More information about the Python-list
mailing list