[issue25452] Add __bool__() method to subprocess.CompletedProcess

Serhiy Storchaka report at bugs.python.org
Sun Feb 26 12:09:59 EST 2017


Serhiy Storchaka added the comment:

I'm not sure that it is worth to implement the __bool__() method. This doesn't add much in comparison with checking the returncode attribute.

The change can break existing code that uses boolean testing instead of checking for None.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25452>
_______________________________________


More information about the Python-bugs-list mailing list