This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author med2277
Recipients GBeauregard, carljm, eric.smith, med2277, msully4321, saaketp
Date 2022-01-21.01:21:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642728076.7.0.775989051938.issue45384@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-01-21 01:21:16med2277setrecipients: + med2277, eric.smith, carljm, GBeauregard, saaketp, msully4321
2022-01-21 01:21:16med2277setmessageid: <1642728076.7.0.775989051938.issue45384@roundup.psfhosted.org>
2022-01-21 01:21:16med2277linkissue45384 messages
2022-01-21 01:21:16med2277create