---
source: crates/ruff_linter/src/rules/flake8_comprehensions/mod.rs
---
C420 [*] Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
 --> C420_1.py:1:1
  |
1 | {x: NotImplemented for x in "XY"}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
help: Replace with `dict.fromkeys(iterable)`)
  |
  - {x: NotImplemented for x in "XY"}
1 + dict.fromkeys("XY", NotImplemented)
2 |
  |
