On Sunday 02 February 2003 11:07 pm, Brett Cannon wrote: ... > Now if ``__exit__()`` would be executed regardless of exceptions this > would probably eliminate a decent chunk of code that uses ``finally:`` Hmmm, yes, I _was_ sort of assuming that __exit__ runs much like 'finally' would -- otherwise cleanup/release code would more often than not have to be duplicated. > Either way this seems rather nice. And if you can pass in arguments (as I > think ``FILE = file('blah.txt', 'rb'): (some_argument):`` is supposed to > implement) this would be really nice. =) I think THAT is the complicated part of the "do" syntax -- that trailing "(whatever):" that I don't understand. What would its pluses be? Where would that 'whatever' be directed to...? Could you please provide a use case for with + "(some_argument):" ...? Alex
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