Move 2.7 to 2 (#635)

Closes #579.
This commit is contained in:
Guido van Rossum
2016-10-26 16:24:49 -07:00
committed by GitHub
parent d60bea14f6
commit cb97bb54c0
338 changed files with 0 additions and 0 deletions

28
stdlib/2/struct.pyi Normal file
View File

@@ -0,0 +1,28 @@
# Stubs for struct for Python 2.7
# Based on https://docs.python.org/2/library/struct.html
from typing import Any, Tuple
class error(Exception): ...
def pack(fmt: str, *v: Any) -> str: ...
# TODO buffer type
def pack_into(fmt: str, buffer: Any, offset: int, *v: Any) -> None: ...
# TODO buffer type
def unpack(fmt: str, buffer: Any) -> Tuple[Any, ...]: ...
def unpack_from(fmt: str, buffer: Any, offset: int = ...) -> Tuple[Any, ...]: ...
def calcsize(fmt: str) -> int: ...
class Struct:
format = ... # type: str
size = ... # type: int
def __init__(self, format: str) -> None: ...
def pack(self, *v: Any) -> str: ...
# TODO buffer type
def pack_into(self, buffer: Any, offset: int, *v: Any) -> None: ...
def unpack(self, buffer: Any) -> Tuple[Any, ...]: ...
def unpack_from(self, buffer: Any, offset: int = ...) -> Tuple[Any, ...]: ...