Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General cleanup, discuss negative numbers and enums, allow nested lit…
…erals This commit: 1. Performs a bunch of cleanup suggested by Ivan 2. Adds a note clarifying that negative numbers are *allowed* 3. Adds a note reiterating that PEP 484 expects type checkers to understand enum values when performing type inference (and suggests this can be implemented by treating enums as roughly equal to the union of their types) 4. Moves "nested literals" into the "supported" category -- as I discovered in python/mypy#5947, implementing support for this is not as bad as I thought. 5. Adds an explicit warning to the "literals and generics" section. 6. Modifies some text to become more firm about disallowing 'Literal[Any]' and related constructs. 7. Deletes discussion about TypeScript's "index types" and "keyof" operator -- I mostly included that only because I got some feedback earlier to discuss TypeScript. It felt pretty shoehorned in, anyways.
- Loading branch information