Side effects? I dont exactly understand what you mean but let me have ago at it anyway.
For file operations, Python uses the operating system's default buffering unless you configure it do otherwise. You can specify a buffer size, unbuffered, or line buffered. So If you are constantly using flush
there is constant IO going on and If you are flushing out large amounts of data (i.e. buffer being big) this could slow does other running programs which could end up waiting for IO.
Fast and frequent IO operations are not good for the life of a harddisk, it increases changes of disk crashes.
Typically the pattern I follow is after all the writing to file object is done, flush is done at the end before closing the file.
Something for you to think about, are there other threads or programs reading from the same file as you are writing it? If this is the case you might get into trouble! Corrupt files are very much a possibility here. If you are considering using file as a persistent data store. Then its the wrong way to do it. Why not consider using a persistent-DB (like mysql or even sqlite) instead of using a file as a data store.