mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
The docs for Python 2 and Python 3 both explicitly mentions that None is a valid value for sep and end. https://docs.python.org/3/library/functions.html#print
This commit is contained in:
committed by
Jelle Zijlstra
parent
a9a4fd0d42
commit
5fdd6ad1a5
@@ -1351,12 +1351,16 @@ def ord(__c: Union[Text, bytes]) -> int: ...
|
||||
if sys.version_info >= (3,):
|
||||
class _Writer(Protocol):
|
||||
def write(self, __s: str) -> Any: ...
|
||||
def print(*values: object, sep: Text = ..., end: Text = ..., file: Optional[_Writer] = ..., flush: bool = ...) -> None: ...
|
||||
def print(
|
||||
*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ..., flush: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
class _Writer(Protocol):
|
||||
def write(self, __s: Any) -> Any: ...
|
||||
# This is only available after from __future__ import print_function.
|
||||
def print(*values: object, sep: Text = ..., end: Text = ..., file: Optional[_Writer] = ...) -> None: ...
|
||||
def print(*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ...) -> None: ...
|
||||
|
||||
@overload
|
||||
def pow(__x: int, __y: int) -> Any: ... # The return type can be int or float, depending on y
|
||||
@overload
|
||||
|
||||
@@ -1351,12 +1351,16 @@ def ord(__c: Union[Text, bytes]) -> int: ...
|
||||
if sys.version_info >= (3,):
|
||||
class _Writer(Protocol):
|
||||
def write(self, __s: str) -> Any: ...
|
||||
def print(*values: object, sep: Text = ..., end: Text = ..., file: Optional[_Writer] = ..., flush: bool = ...) -> None: ...
|
||||
def print(
|
||||
*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ..., flush: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
class _Writer(Protocol):
|
||||
def write(self, __s: Any) -> Any: ...
|
||||
# This is only available after from __future__ import print_function.
|
||||
def print(*values: object, sep: Text = ..., end: Text = ..., file: Optional[_Writer] = ...) -> None: ...
|
||||
def print(*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ...) -> None: ...
|
||||
|
||||
@overload
|
||||
def pow(__x: int, __y: int) -> Any: ... # The return type can be int or float, depending on y
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user