
March 7, 2022
4:11 a.m.
Am 05.03.22 um 00:33 schrieb Shantanu Jain:
I have a preference for having the defaults live close to the class.
Ideally, generics would be initialized at the point where they are used, like in all other languages I'm familiar with. But I don't think we can do this is in a readable manner without new syntax, and that is unlikely to happen soon, considering the SC's stance on typing features. For the moment I think defining the default as part of the TypeVar declaration is the best option, so as not to split the definition of the type var across multiple places. - Sebastian