Richard Neumann added the comment:

A useless use case is attached.
Basically it boils down to having the ability to evaluate the CompletedProcess 
directly by if/else rather than comparing its returncode attribute to zero each 
time or handling the exception raised by check_returncode().
I use this quite frequently in programs which run system commands.
Before the new subprocess.run() method and subprocess.CompletedProcess were 
introduced with python 3.5 I already wrote my own library for that, wich now 
nearly became obsoleted by the new subprocess library of python 3.5 with the 
expection that it does not have this feature.
See the class ProcessResult here: 
https://github.com/HOMEINFO/homeinfo-lib/blob/master/homeinfo/lib/system.py

----------
Added file: http://bugs.python.org/file40836/usecase.py

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

Reply via email to