Cecil Curry

Results 584 comments of Cecil Curry

> 3.10 actually reverted defaulting to that, so a solution could be found that works better for runtime typing. **Wait.** Rly? Like, srsly? I mean, that's great. I'll need to...

**...I know, I know.** I should do that. Gods, why are you always right! This is like participatory democracy all over again: if you don't participate, you don't get the...

> Instead of overriding the entire fucntion, it might also be good to transfer the code object across. Then copies of the function imported before `beartype` will also be updated,...

> ...so you'll need to add any additional globals there as well. **Right-o.** As well as patch up `__defaults__`, if we end up microoptimizing via that route. Yup! We actually...

Lastly, I have a painfully stupid alternative to everything clever you devised above. Rather than abuse code objects, just: 1. Search up the call stack for the external third-party module...

I didn't even think of the obvious bare `import typing` case. `` Very well. We congenially agree as gentlemen that this is ugly, then.

**Ah-ha!** The obvious bare `import typing` case isn't actually a problem, because in that case our trivial `typing.overload = beartype_overload` monkey-patch will still apply. Using it from elsewhere: ditto... *probably.*...

![yeah, well, you know, like](https://i.imgflip.com/48vc9y.png) ...*is what I'd say if I was a jerk.* Instead, I'm Canadian. Like all patriotic frost-bite victims, I'm required by federal law to be congenial,...

`` **Right-o.** I *knew* I was forgetting something from the above dissection of angry dragons. `@beartype` also needs to uncache previously cached `RECORD` entries – not only for the nested...

![like, dude, woah](https://i.kym-cdn.com/entries/icons/original/000/007/630/conspiracykeanu.jpg) That's deviousness beyond all prior clinically understandings of deviousness. You just out-Machiavelli-ed mypy at its own game – and I for one welcome and nervously applaud our...