4 ms·
You mean after 2.5 right? try: return True finally: return False -- There's an error in your program: * 'return' outside function ... Just sayin'
by josephkern 17y ago
You mean after 2.5 right?
try:
return True
finally:
return False
-- There's an error in your program:
* 'return' outside function ...
Just sayin'
- paulbaumgart 17y agoIt 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...