From 48b3b260d1daf2c674f325110c30bcdf7ac483f3 Mon Sep 17 00:00:00 2001 From: David Fisher Date: Thu, 18 Feb 2016 16:25:30 -0800 Subject: [PATCH 1/2] Remove invalid Python 3 syntax --- stdlib/2.7/__builtin__.pyi | 4 ---- stdlib/3/builtins.pyi | 4 ---- 2 files changed, 8 deletions(-) diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 546202b29..93c4765fc 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -629,10 +629,6 @@ class module: __file__ = ... # type: str __dict__ = ... # type: Dict[unicode, Any] -True = ... # type: bool -False = ... # type: bool -__debug__ = False - long = int bytes = str diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 7a6a4994b..1e4eea8ef 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -605,10 +605,6 @@ class module: __file__ = ... # type: str __dict__ = ... # type: Dict[str, Any] -True = ... # type: bool -False = ... # type: bool -__debug__ = False - NotImplemented = ... # type: Any def abs(n: SupportsAbs[_T]) -> _T: ... From f7349d46e97455409637b4d263bb17c7e7b7e218 Mon Sep 17 00:00:00 2001 From: David Fisher Date: Sat, 20 Feb 2016 22:47:38 -0800 Subject: [PATCH 2/2] Add comment about True/False omission in 2.7 builtins --- stdlib/2.7/__builtin__.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 93c4765fc..16f04c46f 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -1,5 +1,8 @@ # Stubs for builtins (Python 2.7) +# True and False are deliberately omitted because they are keywords in +# Python 3, and stub files conform to Python 3 syntax. + from typing import ( TypeVar, Iterator, Iterable, overload, Sequence, Mapping, Tuple, List, Any, Dict, Callable, Generic, Set,