mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)
This commit is contained in:
parent
7c4185d62d
commit
e3ec44d692
4 changed files with 17 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue