Python Try-Except inside of Function

后端 未结 6 1899
旧巷少年郎
旧巷少年郎 2020-12-11 23:03

I\'ve got a pretty good understanding of python\'s try-except clause, but I\'m encountering problems when trying to put it inside of a function.

>>>         


        
6条回答
  •  春和景丽
    2020-12-12 00:03

    This has nothing to do with your exception handler. The error you are seeing is because "foo" is not defined anywhere.

提交回复
热议问题