Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Explicit Hook Functions #79

Merged
merged 1 commit into from Aug 10, 2023
Merged

Add Explicit Hook Functions #79

merged 1 commit into from Aug 10, 2023

Conversation

axtimhaus
Copy link
Member

To allow giving lambda functions as explicit hook value.
Only on explicit hook values callability will be checked.
Allowed are parameterless functions and functions with one parameter (self).
So for example:

Profile.round(
    diameter=10e-3,
    density=lambda self: 7.85 / (1 + 3 * 1e-5 * self.temperature),
)

@axtimhaus axtimhaus requested a review from ChRen95 August 10, 2023 13:23
@axtimhaus axtimhaus added this to the v2.1 milestone Aug 10, 2023
@ChRen95 ChRen95 merged commit f0935ee into main Aug 10, 2023
@ChRen95 ChRen95 deleted the explicit_hook_functions branch August 10, 2023 14:05
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.

None yet

2 participants