Globals/compatibility_fixes.py

changeset 5587
ea526b78ee6c
parent 4691
0fe41214fdd6
equal deleted inserted replaced
5586:0e5421d679e7 5587:ea526b78ee6c
150 The Eric6 used features are emulated only. The not emulated features 150 The Eric6 used features are emulated only. The not emulated features
151 should throw a NotImplementedError exception. 151 should throw a NotImplementedError exception.
152 """ 152 """
153 153
154 154
155 def open(file, mode='r', buffering=-1, encoding=None, 155 def open(filein, mode='r', buffering=-1, encoding=None,
156 errors=None, newline=None, closefd=True): 156 errors=None, newline=None, closefd=True):
157 """ 157 """
158 Replacement for the build in open function. 158 Replacement for the build in open function.
159 159
160 @param file filename or file descriptor (string) 160 @param filein filename or file descriptor (string)
161 @keyparam mode access mode (string) 161 @keyparam mode access mode (string)
162 @keyparam buffering size of the read buffer (string) 162 @keyparam buffering size of the read buffer (string)
163 @keyparam encoding character encoding for reading/ writing (string) 163 @keyparam encoding character encoding for reading/ writing (string)
164 @keyparam errors behavior for the character encoding ('strict', 164 @keyparam errors behavior for the character encoding ('strict',
165 'explicit', ...) (string) 165 'explicit', ...) (string)
166 @keyparam newline controls how universal newlines works (string) 166 @keyparam newline controls how universal newlines works (string)
167 @keyparam closefd close underlying file descriptor if given as file 167 @keyparam closefd close underlying file descriptor if given as file
168 parameter (boolean) 168 parameter (boolean)
169 @return Returns the new file object 169 @return Returns the new file object
170 """ 170 """
171 return File(file, mode, buffering, encoding, errors, newline, closefd) 171 return File(filein, mode, buffering, encoding, errors, newline, closefd)
172 172
173 173
174 class File(file): # __IGNORE_WARNING__ 174 class File(file): # __IGNORE_WARNING__
175 """ 175 """
176 Facade for the original file class. 176 Facade for the original file class.

eric ide

mercurial