bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)

This commit is contained in:
Ethan Smith 2020-04-09 21:47:31 -07:00 committed by GitHub
parent 7c4185d62d
commit e3ec44d692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -73,6 +73,7 @@ XXX Possible additions:
"""
import sys, os
from types import GenericAlias
__all__ = ["input", "close", "nextfile", "filename", "lineno", "filelineno",
"fileno", "isfirstline", "isstdin", "FileInput", "hook_compressed",
@ -391,6 +392,8 @@ class FileInput:
def isstdin(self):
return self._isstdin
__class_getitem__ = classmethod(GenericAlias)
def hook_compressed(filename, mode):
ext = os.path.splitext(filename)[1]