Message411067
I recently hit this issue working on a config/parsing runtime type checking library (similar in spirit to pydantic).
The one other special typeform I was using these with that led me to discover this issue was Annotated. I use Annotated a fair amount to do some runtime analysis and I was used to `Annotated[typeform]` always works. But ClassVar and Final are special and `Annotated[ClassVar[...]] `and `Annotated[Final[...]]` both fail. I find `Annotated` interaction also weird. I ended up working around it by doing `ClassVar[Annotated[...]]` and stripping the classvar/final to look for the annotation metadata.
I think all 3 of annotated/final/classvar should be order compatible as they all serve to add information on the type they contain.
If we ignore Annotated, I would say ClassVar/Final should be order compatible and a rule that Final[ClassVar[...]] works but not ClassVar[Final[...]] or vice versa would be weird. |
|
Date |
User |
Action |
Args |
2022-01-21 01:21:16 | med2277 | set | recipients:
+ med2277, eric.smith, carljm, GBeauregard, saaketp, msully4321 |
2022-01-21 01:21:16 | med2277 | set | messageid: <1642728076.7.0.775989051938.issue45384@roundup.psfhosted.org> |
2022-01-21 01:21:16 | med2277 | link | issue45384 messages |
2022-01-21 01:21:16 | med2277 | create | |
|