/external/python/cpython2/Lib/ |
D | fileinput.py | 86 mode="r", openhook=None): argument 96 _state = FileInput(files, inplace, backup, bufsize, mode, openhook) 191 mode="r", openhook=None): argument 217 if inplace and openhook: 219 elif openhook and not hasattr(openhook, '__call__'): 221 self._openhook = openhook 383 def openhook(filename, mode): function 386 return openhook
|
/external/python/cpython3/Lib/ |
D | fileinput.py | 84 def input(files=None, inplace=False, backup="", *, mode="r", openhook=None): argument 94 _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook) 189 mode="r", openhook=None): argument 222 if openhook: 225 if not callable(openhook): 227 self._openhook = openhook 411 def openhook(filename, mode): function 413 return openhook
|
/external/python/cpython2/Lib/test/ |
D | test_fileinput.py | 43 def openhook(self, filename, mode): member in LineReader 239 fi = FileInput(inplace=1, openhook=lambda f,m: None) 245 fi = FileInput(openhook=1) 252 fi = FileInput(files=t1, openhook=hook_encoded("utf-7")) 267 fi = FileInput(files=TESTFN, openhook=hook_encoded('ascii')) 280 fi = FileInput(files=['line1\nline2', 'line3\n'], openhook=src.openhook) 296 fi = FileInput(files=['line1\nline2', 'line3\n'], openhook=src.openhook) 321 openhook=hook_encoded('utf-7'))
|
/external/python/cpython3/Lib/test/ |
D | test_fileinput.py | 59 def openhook(self, filename, mode): member in LineReader 264 fi = FileInput(inplace=1, openhook=lambda f, m: None) 270 fi = FileInput(openhook=1) 284 with FileInput([t], openhook=custom_open_hook) as fi: 298 openhook=hook_encoded('ascii')) as fi: 477 openhook=src.openhook) as fi: 493 openhook=src.openhook) as fi: 529 mode="r", openhook=None): argument 534 self.openhook = openhook 636 openhook = object() [all …]
|
/external/python/cpython3/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 58 .. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None) 77 The keyword parameters *mode* and *openhook* are now keyword-only. 140 .. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None) 154 The *openhook*, when given, must be a function that takes two arguments, 156 cannot use *inplace* and *openhook* together. 176 The keyword parameter *mode* and *openhook* are now keyword-only. 201 Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)`` 210 fileinput.FileInput(openhook=fileinput.hook_encoded("utf-8",
|
/external/python/cpython2/Doc/library/ |
D | fileinput.rst | 45 *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The 53 .. function:: input([files[, inplace[, backup[, bufsize[, mode[, openhook]]]]]]) 61 Added the *mode* and *openhook* parameters. 128 .. class:: FileInput([files[, inplace[, backup[,bufsize[, mode[, openhook]]]]]]) 142 The *openhook*, when given, must be a function that takes two arguments, 144 cannot use *inplace* and *openhook* together. 147 Added the *mode* and *openhook* parameters. 177 Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)`` 188 fileinput.FileInput(openhook=fileinput.hook_encoded("iso-8859-1"))``
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.8.0b1.rst | 822 as a result the **mode** and **openhook** arguments have been made
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.5.rst | 1347 newlines` mode. Another new parameter, *openhook*, lets you use a function
|
/external/python/cpython3/Doc/whatsnew/ |
D | 2.5.rst | 1348 newlines` mode. Another new parameter, *openhook*, lets you use a function
|