Skip Montanaro <skip.montan...@gmail.com> added the comment:

I was bitten by this porting a system from Python 2.7 to 3.6. "/dev/stderr" is 
a very nice default for logfiles. Users will frequently override the default, 
so you really want to open the logfile in append mode. Having to jump through 
hoops to avoid blasting a user's logfile is kinda dumb, and as others have 
pointed out, error-prone.

os.open works just fine with O_WRONLY|O_APPEND as the flags. /dev/null can be 
opened in append mode, but not /dev/stderr or /dev/stdout.

----------
nosy: +skip.montanaro

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27805>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to