Skip to content

Transformation functions can be defined as callables#20

Open
altunyurt wants to merge 2 commits intoAttumm:mainfrom
altunyurt:main
Open

Transformation functions can be defined as callables#20
altunyurt wants to merge 2 commits intoAttumm:mainfrom
altunyurt:main

Conversation

@altunyurt
Copy link

I extended the *_transformation to accept callables as values.

In [1]: from maat import scale

In [2]: scale({"i": "34"}, {"i": {"type": "int", "cast": True, "transform": lambda x: min(x, 25)}})
Out[2]: {'i': 25}

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.

1 participant