
July 27, 2022
8:35 p.m.
On Thu, 28 Jul 2022 at 06:29, Lucas Wiman <lucas.wiman@gmail.com> wrote:
So rather than proposals for weird magic objects that do weird things as function arguments, I'd much rather see proposals to fix the reported signature, which would largely solve the problem without magic. (Or technically, without *more* magic; the only magic needed is "if the function has a __wrapped__ attribute, use the signature from that", which already exists in many tools.)
Note that per PEP 362, tools should also respect the __signature__ magic attribute (and that should override the signature of .__wrapped__ when both are present).
Agreed, but IMO __signature__ isn't magic (__wrapped__ kinda is). But the point is, it's a very low level of magic. ChrisA