Closed bob-white closed 7 years ago
this looks neater. Maybe at that point we don't need the *=
and we instead catch that the arg list is a tuple?
Oh I like that, it didn't even occur to me.
Updated it so that we only need to care about +=
and -=
.
Added some tests for the new behavior.
Do you want to add docs, or shall I?
Doh, sorry
Updated the docs, and the basicList example.
Also realized that using this we can bind a lambda
, though only 1 because the __name__
field is always <lambda>
So it will overwrite if you try to bind a second one.
why not detect it and use id (lambda)
as the key?
Completely forgot about id
I'll swap that around.
Its probably better to just use id(handler)
as that would cover all callables.
does (id) work on weak refs?
It does, but you get the id of the weakref not the original object's id. Same thing with a proxy
A possible solution to #40
Instead of trying to infer some kind of stash object like my last solution, this one requires that you explicitly pass a stash object along with the handler.
Updated the example from the issue .
Updated the example to use the
+=
syntax, as per the suggestion.