Searched refs:openhook (Results 1 – 5 of 5) sorted by relevance
/third_party/python/Lib/ |
D | fileinput.py | 78 def input(files=None, inplace=False, backup="", *, mode="r", openhook=None, argument 89 _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook, 185 mode="r", openhook=None, encoding=None, errors=None): argument 214 "b" not in mode and encoding is None and openhook is None): 229 if openhook: 232 if not callable(openhook): 234 self._openhook = openhook 438 def openhook(filename, mode): function 440 return openhook
|
/third_party/python/Lib/test/ |
D | test_fileinput.py | 64 def openhook(self, filename, mode): member in LineReader 269 fi = FileInput(inplace=1, openhook=lambda f, m: None) 275 fi = FileInput(openhook=1) 289 with FileInput([t], openhook=custom_open_hook) as fi: 303 openhook=hook_encoded('ascii')) as fi: 343 with FileInput([t], openhook=old_hook) as fi: 490 openhook=src.openhook) as fi: 506 openhook=src.openhook) as fi: 542 mode="r", openhook=None, encoding=None, errors=None): argument 547 self.openhook = openhook [all …]
|
/third_party/python/Doc/library/ |
D | fileinput.rst | 26 replaced by ``sys.stdin`` and the optional arguments *mode* and *openhook* 50 *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The 59 .. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None, encoding=None… 78 The keyword parameters *mode* and *openhook* are now keyword-only. 144 .. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None, encoding=Non… 158 The *openhook*, when given, must be a function that takes two arguments, 160 cannot use *inplace* and *openhook* together. 162 You can specify *encoding* and *errors* that is passed to :func:`open` or *openhook*. 181 The keyword parameter *mode* and *openhook* are now keyword-only. 211 … Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed, encoding="utf-8")`` [all …]
|
/third_party/python/Misc/NEWS.d/ |
D | 3.8.0b1.rst | 822 as a result the **mode** and **openhook** arguments have been made
|
/third_party/python/Doc/whatsnew/ |
D | 2.5.rst | 1348 newlines` mode. Another new parameter, *openhook*, lets you use a function
|