为什么提出例外是副作用?
原文:Why is the raising of an exception a side effect?
原文:Why is the raising of an exception a side effect?
根据 Vikipedia 的副作用条目, 提出例外构成副作用。 考虑此简单的 python 函数 : def foo( arg) : 如果不是 arg: 提高 valueError( rg...) 。