Why does Python process the default statement of dict.get() when the key is found?

前端 未结 0 642
孤街浪徒
孤街浪徒 2020-11-30 09:39

I just spent (i.e. wasted) a lot of time tracking down a bug, which it turns out is unexpected, non-Pythonic (IMHO) behavior of Python.

When I run the following:

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