Improve signature of communicate().

The input type can be bytes or unicode, the return types are always Optional bytes.
This commit is contained in:
Guido van Rossum
2016-08-17 20:25:15 -07:00
parent 794e51612e
commit 8be390d2a6

View File

@@ -87,8 +87,7 @@ class Popen:
def poll(self) -> int: ...
def wait(self) -> int: ...
# Return str/bytes
def communicate(self, input: Union[str, unicode] = ...) -> Tuple[str, str]: ...
def communicate(self, input: Union[bytes, unicode] = ...) -> Tuple[Optional[bytes], Optional[bytes]]: ...
def send_signal(self, signal: int) -> None: ...
def terminate(self) -> None: ...
def kill(self) -> None: ...