mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
py/modio: Remove FileIO and TextIOWrapper from io module.
On ports with more than one filesystem, the type will be wrong, for example if using LFS but FAT enabled, then the type will be FAT. So it's not possible to use these classes to identify a file object type. Furthermore, constructing an io.FileIO currently crashes on FAT, and make_new isn't supported on LFS. And the io.TextIOWrapper class does not match CPython at all. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
c0fa903d6b
commit
e65d1e69e8
@@ -42,8 +42,8 @@ f.close()
|
||||
# close on a closed file should succeed
|
||||
f.close()
|
||||
|
||||
# construct a file object using the type constructor, with a raw fileno
|
||||
f = type(f)(2)
|
||||
# construct a file object with a raw fileno
|
||||
f = open(2)
|
||||
print(f)
|
||||
|
||||
# file read
|
||||
|
||||
Reference in New Issue
Block a user