Commit Graph
2 Commits
Author SHA1 Message Date
deix 00e5246f96 Comparisons to singletons like None should always be done with is or is not, never the equality operators. 2017-08-28 17:51:27 +02:00
deix d9330ef698 Use the "with" keyword when dealing with file objects
It is good practice to use the "with" keyword when dealing with file objects. This has the advantage that the file is properly closed after its suite finishes, even if an exception is raised on the way. It is also much shorter than writing equivalent try-finally blocks
2017-08-28 17:20:38 +02:00