On Fri, Mar 11, 2016 at 8:48 AM, Fillmore <fillmore_rem...@hotmail.com>
wrote:

> On 3/10/2016 5:16 PM, Ian Kelly wrote:
>
>>
>> Interesting, both of these are probably worth bringing up as issues on
>> the bugs.python.org tracker. I'm not sure that the behavior should be
>> changed (if we get an error, we shouldn't just swallow it) but it does
>> seem like a significant hassle for writing command-line
>> text-processing tools.
>>
>
> is it possible that I am the first one encountering this kind of issues?
>
>
No.  I see it usually.

Python's zen says:

> Errors should never pass silently.
>    Unless explicitly silenced.

When failed to write to stdout, Python should raise Exception.
You can silence explicitly when it's safe:

try:
    print(...)
except BrokenPipeError:
    os.exit(0)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to