Skip to content

Conversation

@geigerzaehler
Copy link
Contributor

@geigerzaehler geigerzaehler commented Feb 1, 2025

Maybe I’m missing something here, but when I played around with contexts I noticed that you don’t need to pass a function to a context provider. Context consumers need to be function to delay evaluation until the context is available and this is taken care of by the decorator.

@pelme
Copy link
Owner

pelme commented Feb 1, 2025

Very cool, thanks for bringing this up! I confused the consumer/provider side of things and agree that it seems unnecessary with the lambdas there. The lambdas are super annoying so getting rid of them here makes it much more straightforward. And this is totally backward compatible since callables are nodes too.

This change looks good to me, I just need to think a little bit more about it before hitting merge!

@geigerzaehler
Copy link
Contributor Author

Cool, I just pushed some more changes to the documentation.

@pelme pelme merged commit 1e0986a into pelme:main Feb 1, 2025
14 checks passed
@pelme
Copy link
Owner

pelme commented Feb 1, 2025

Again, thanks for catching this. It removes an strange thing to consider when using contexts!

@geigerzaehler geigerzaehler deleted the general-context-provider branch February 1, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants