Add missing private field to NamedTuple (#1866)

It is very useful for doing introspection.
This commit is contained in:
Salvo 'LtWorf' Tomaselli
2018-02-14 17:11:19 +01:00
committed by Łukasz Langa
parent 3c4bc4266d
commit b33c7d1a84

View File

@@ -535,6 +535,7 @@ def cast(tp: Type[_T], obj: Any) -> _T: ...
# NamedTuple is special-cased in the type checker
class NamedTuple(tuple):
_field_types = ... # type: collections.OrderedDict[str, Type[Any]]
_fields = ... # type: Tuple[str, ...]
_source = ... # type: str