support screen
and eyetracker
being passed as dict
in Experiment.__init__()
#991
Labels
screen
and eyetracker
being passed as dict
in Experiment.__init__()
#991
Description of the problem
It would be nice if the screen and eyetracker arguments in the experiment init could be overloaded to also support dictionaries.
Let's take this dict as an example:
Trying to initialize a
DatasetDefinition
withDatasetDefinition(**dict_definition)
wont' work asscreen
andeyetracker
are just dicts and not the initialized class objects.#914 implemented a workaround in its
DatsetDefinition.from_yaml()
method but it would be more elegant to solve this in theExperiment.__init__()
itself.Description of a solution
The
screen
andeyetracker
arguments inExperiment.__init__()
should be overloaded to also support dictionaries.If a dictionary is passed, a
Screen
orEyeTracker
object should be initialized on the fly.The text was updated successfully, but these errors were encountered: