Alex Martelli writes: > I *LIKE* this: a termination-method SHOULD be idempotent > (a no-op when called more than once), so that if various ways to > "ensure the termination method is called" happen to be used all > at once, that doesn't break anything. I'm not sure I agree. You write your code which does 3 different things to ensure that the file gets closed. Then I, the poor maintenance programmer, is asked to make a change... don't close the file until later on. I find the spot in the code where you=20 close the file and "fix" it... but the file still seems to close! I find ANOTHER spot where you close it, and remove that one too... but the file STILL won't behave. If we had a SINGLE approach which was reliable and easy-to-use,=20 (which is, of course, what we're aiming for) couldn't we just use=20 that everywhere, and use it just once? -- Michael Chermside
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4