open(file, mode='r', ...)
with open('file.txt', 'w') as f: f.write('hello')
<_io.TextIOWrapper name='file.txt' mode='w' encoding='UTF-8'>