Prefer dict/set literals and comprehension
Created originally on Bitbucket by jdufresne (Jon Dufresne)
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
- Features available on all supported Python versions
- Takes advantages of modern Python syntax
- dict/set literals are always faster than constructors
- dict/set comprehension avoid temporary lists in memory