Skip to content

Get rid of converter logic #343

Open
@filipsch

Description

@filipsch

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:

Things to do:

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions