Redo six.moves to be implemented purely using imports.

Based on https://github.com/python/typeshed/pull/21.
This commit is contained in:
Tim Abbott
2016-01-26 12:47:16 -08:00
committed by Tim Abbott
parent 8f3f56d07f
commit bcdec9043d
4 changed files with 55 additions and 44 deletions

View File

@@ -1,24 +1,25 @@
# Provisional stubs for six.moves (Python 2.7)
# Generated by stubtool 0.1, DO NOT EDIT
# See https://github.com/o11c/stubtool
#
# Stubs for six.moves (Python 3.2)
from typing import overload, TypeVar, Tuple, Iterable, Iterator
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')
_T3 = TypeVar('_T3')
_T4 = TypeVar('_T4')
@overload
def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ...
@overload
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ...
@overload
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ...
@overload
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2,
_T3, _T4]]: ... # TODO more than four iterables
# For re-export.
from io import StringIO as cStringIO
import pickle as cPickle
from builtins import filter as filter
from itertools import filterfalse as filterfalse
from builtins import input as input
from sys import intern as intern
from builtins import map as map
from os import getcwd as getcwd
from os import getcwdb as getcwdb
from builtins import range as range
from imp import reload as reload_module
from functools import reduce as reduce
from shlex import quote as shlex_quote
from io import StringIO as StringIO
# from collections import UserDict as UserDict
# from collections import UserList as UserList
# from collections import UserString as UserString
from builtins import range as xrange
from builtins import zip as zip
from itertools import zip_longest as zip_longest
import six.moves.cPickle as cPickle

6
third_party/3/six/moves/cPickle.pyi vendored Normal file
View File

@@ -0,0 +1,6 @@
# Generated by stubtool 0.1, DO NOT EDIT
# See https://github.com/o11c/stubtool
#
# Stubs for six.moves.cPickle (Python 3.2)
from pickle import *