How do I make a defaultdict safe for unexpecting clients?

后端 未结 5 2135
情话喂你
情话喂你 2021-01-05 15:00

Several times (even several in a row) I\'ve been bitten by the defaultdict bug: forgetting that something is actually a defaultdict and treating it like a regular dictionary

5条回答
提交回复
热议问题