sds2019 icon indicating copy to clipboard operation
sds2019 copied to clipboard

Lecture 8 - Connector function use "with open"?

Open jrkkfst opened this issue 5 years ago • 2 comments

I haven't looked in detail at the Connector function, but noted that after running it myself once the file didn't close immediately. Ie. I couldn't view it (it perhaps hadn't flushed the cache?)

My question is, would it be useful to open the log file in the Connector function using "with open" to always close the file, when needed?

Perhaps this has been considered and isn't necessary?

jrkkfst avatar Aug 15 '19 11:08 jrkkfst

This is a good suggestion, i have begun implementing it in https://github.com/elben10/ScrapingClass/pull/1. If you want to contribute feel free.

kristianolesenlarsen avatar Aug 15 '19 17:08 kristianolesenlarsen

Thanks for the suggestion. It is now implemented.

elben10 avatar Aug 15 '19 19:08 elben10