aroberge / ideas

Easy creation of custom import hooks to experiment on alternatives to Python's syntax; see https://aroberge.github.io/ideas/docs/html/
Other
79 stars 4 forks source link

Don't open for writing or hold open while decoding #47

Closed djpohly closed 11 months ago

djpohly commented 11 months ago

The "r+b" mode includes write permission, which isn't needed to execute a script (and was confusing inotify). In addition, the file can be closed right after reading the encoded source, rather than holding it open while decoding.

aroberge commented 11 months ago

Thank you. I didn't realize that there was a difference between 'r+b' and 'rb'.