3 ms·
Yes it is rather unfortunate, Python's typing system doesn't support dynamically creating types like you can in TypeScript :/
by probablyrobert 5y ago
Yes it is rather unfortunate, Python's typing system doesn't support dynamically creating types like you can in TypeScript :/
- dllthomas 5y ago> dynamically creating types Could you explain what you mean by this? I'm not clear on what typescript behavior this describes.
- joshribakoff 5y agoMaybes mapped types are an example? https://www.typescriptlang.org/docs/handbook/2/mapped-types.html https://www.typescriptlang.org/docs/handbook/2/mapped-types....
- probablyrobert 5y agoYes mapped types is a good example, Pick is also a good example: https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys https://www.typescriptlang.org/docs/handbook/utility-types.h...
- dllthomas 5y agoAh, I read "dynamic" as implying something at runtime. I agree that these are extremely useful.