2 ms·
It works if you put it in a function (2.5.1): >>> def test(): ... try: return True ... finally: return False ... >>> test() False
by paulbaumgart 17y ago
It works if you put it in a function (2.5.1):
>>> def test():
... try: return True
... finally: return False
...
>>> test()
False
- Jach 17y ago2.6.2 as well. I liked this little snippet, though I grumbled a little on the inside and would be appalled if I ever found something like that in serious code...