Open tomjnixon opened 1 year ago
Just got bit by this again:
async def event_listen(path, client):
event = yarp.Event()
await client.event_listen_cb(path, event.emit_event)
return event
emit_event
should just emit
, but results in another Event
, and because __call__
is wrapped too, when the callback is called, nothing happens
i definitely want to move some of this into a proxy, probably attribute access and calling (or just remove them and use functions)
For example, instead of writing
It might be:
Advantages of this change:
this could probably be tidied up, but it just makes it even more confusing when it happens deep in some asyncio mess.
__int__
are propagated when they don't really make sense.The main disadvantage of changing is that it makes it less likely that Values will just work in normal code. On the other hand, the code that this would work with is very limited, and you'd be better off using
fn
anyway.