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
Back in the days, we coded in the ability to define 'converters', functions that are executed on a value before fetching the value from the process, for values that could not be dilled/pickled.
Now, has_equal_value() has the expr_code argument, that allows you to execute arbitrary code, and the func argument, that executes a function on the value before fetching it from the process. This is easier to understand and more elegant.
We should get rid of the former and advocate the latter. There are currently 18 exercises in production that use the converter logic, divided over two courses:
rewrite the SCTs (not fun, but shouldn't take long)
get rid of the set_converter() functionality.
If we really want to clean things up, we could also get rid of the converters that are 'baked into' pythonwhat, under pythownhat/converters.py. This will probably require us to rewrite even more SCTs, but it would help in keeping the codebase of pythonwhat a little cleaner and easier to understand.
The text was updated successfully, but these errors were encountered:
Back in the days, we coded in the ability to define 'converters', functions that are executed on a value before fetching the value from the process, for values that could not be dilled/pickled.
Now,
has_equal_value()
has theexpr_code
argument, that allows you to execute arbitrary code, and thefunc
argument, that executes a function on the value before fetching it from the process. This is easier to understand and more elegant.We should get rid of the former and advocate the latter. There are currently 18 exercises in production that use the converter logic, divided over two courses:
Things to do:
set_converter()
functionality.If we really want to clean things up, we could also get rid of the converters that are 'baked into' pythonwhat, under
pythownhat/converters.py
. This will probably require us to rewrite even more SCTs, but it would help in keeping the codebase of pythonwhat a little cleaner and easier to understand.The text was updated successfully, but these errors were encountered: