Skip to content

Conversation

@Lin-Dongzhao
Copy link
Collaborator

defaultdict 和 ChainMap 共同使用时,会出现问题:

  1. 两个 defaultdict A 和 B,ChainMap 后获得 C
  2. 使用 C[key] 进行查找时,会先在 A 中查找,这是如果没有对应的 key 会直接返回 {},然后就不去 B 中查找了,导致有时候查找数据会出现问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants