Is it good practice to use try/except blocks to check if a function can safely be run when you know in advance some input will be problematic?

前端 未结 0 1173
青春惊慌失措
青春惊慌失措 2021-01-24 16:21

I was writing the following piece of code that converts a string to a float, where the string can have some additional non-digit characters (e.g. \'~\') where I have to deal wit

相关标签:
回答
  • 消灭零回复
提交回复
热议问题