From d09cc058a61b0338bc7961fd75ea82261b185876 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 16 May 2016 17:46:41 +0100 Subject: [PATCH] Add note about not using basestring in tempfile --- stdlib/2.7/tempfile.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/2.7/tempfile.pyi b/stdlib/2.7/tempfile.pyi index 6c6c525cf..6bb4e307c 100644 --- a/stdlib/2.7/tempfile.pyi +++ b/stdlib/2.7/tempfile.pyi @@ -4,6 +4,10 @@ # based on http://docs.python.org/3.3/library/tempfile.html # Adapted for Python 2.7 by Michal Pokorny +# TODO: Don't use basestring. Use Union[str, bytes] or AnyStr for arguments. +# Avoid using Union[str, bytes] for return values, as it implies that +# an isinstance() check will often be required, which is inconvenient. + from typing import Tuple, IO # global variables