mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Make first argument to filter optional
``` $ python3.4 Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> list(filter(None, [False, True])) [True] >>> ```
This commit is contained in:
committed by
Łukasz Langa
parent
57aa1923d5
commit
97a6d27558
@@ -696,7 +696,7 @@ def eval(source: str, globals: Dict[str, Any] = None,
|
||||
def exec(object: str, globals: Dict[str, Any] = None,
|
||||
locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source
|
||||
def exit(code: int = None) -> None: ...
|
||||
def filter(function: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def filter(function: Optional[Callable[[_T], Any]], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def format(o: object, format_spec: str = '') -> str: ...
|
||||
def getattr(o: Any, name: str, default: Any = ...) -> Any: ...
|
||||
def globals() -> Dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user