3 ms·
I welcome the terser type hints for generics. I was wishing for something terser, like: {str: [int]} being equivalent to what is currently dict[str, list[
by trashburger 6y ago
I welcome the terser type hints for generics. I was wishing for something terser, like:
{str: [int]}
being equivalent to what is currently dict[str, list[int]] in the PEP, but I guess it will have to do.
- st1ck 6y ago`{key: val}` does look nice indeed, but then it takes more effort to replace e.g. `dict` with `Mapping`. Everything would look much nicer with Haskell-like syntax: `dict key val` or `list val`. Or maybe even prefer `{} key val` and `[] val` (no that doesn't look good, I agree).
- emidln 6y agoThis was glorious with Clojure's Schema. I miss it every day I work with inferior languages and data specification systems.