4 ms·
Although not really what they were intended for, somebody used annotations to provide a macro system [0]. [0] https://tinkering.xyz/abusing-type-annotations/ h
by DonaldPShimoda 7y ago
Although not really what they were intended for, somebody used annotations to provide a macro system [0].
[0] https://tinkering.xyz/abusing-type-annotations/ https://tinkering.xyz/abusing-type-annotations/
- z_mitchell 7y agoAuthor here. Be warned, this was just a proof of concept that I did because I thought it would be fun/weird/interesting!
- neoncontrails 7y agoOh my goodness. I've committed some naughty deeds with the ast module before, but this is truly, wonderfully, heinous. You push this idea so far that I wouldn't even recognize some of these examples as syntactically valid, let alone predict their effects. I'm awestruck and a little frightened of you.