You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering a lazy deserialiser for a type that extends Protocol, the type can be made not findable by the addition of an unrelated type. The following code correctly finds the deserialiser, unless Bar is registered before Foo- Bar can also be found if baz is removed.
I'm not sure to understand the issue, but there is a bug in your example: lambda: Conversion(lambda as_str: ..., source=str, target=protocol) should be lambda protocol=protocol: Conversion(lambda as_str: ..., source=str, target=protocol) (see https://stackoverflow.com/questions/7546285/creating-lambda-inside-a-loop for example)
By fixing your example, I can either write for protocol in [Foo, Bar] or for protocol in [Bar, Foo] and both works, so I cannot reproduce your issue. Am I missing something?
When registering a lazy deserialiser for a type that extends Protocol, the type can be made not findable by the addition of an unrelated type. The following code correctly finds the deserialiser, unless Bar is registered before Foo- Bar can also be found if baz is removed.
The text was updated successfully, but these errors were encountered: