01:07 | <snek> | I presume the idea is that it could skip that? But then I think that means this is possible: obj to kept objects i guess. |
01:07 | <snek> | the goal is to avoid adding whatever it contains if its not obj |
02:48 | <Ashley Claymore> | That makes sense. Only add to kept objects if it returns true should solve the observable GC issue. |
06:11 | <Mathieu Hofman> | I'm curious about the use case tho. When does one need to test if a weakref contains a certain object. In my experience if I have a weakref, it's because I don't hold the target. |
06:13 | <Mathieu Hofman> | It sounds like one is trying to iterate a set or map of weakref, which is most likely the wrong thing to do in the first place, and sounds like weakmap and weakset should have been used |
22:04 | <snek> | i was just exploring some ways to implement async context stuff. i think you're right that it's probably not needed. you could give each variable a unique id and compare the ids instead of comparing the contents of the weakrefs |