# Bug report ### Bug description: ```python with open("testfile", "r+") as my_file: text = my_file.write("========") print(my_file.readline()) ``` Instead of writing to the beginning of the file, the program writes to the EOF even if readline() is placed after write. ### CPython versions tested on: 3.8, 3.9 ### Operating systems tested on: Windows