Incorrect variables in the exercise_template view
markkuriekkinen opened this issue · 4 comments
mooc-grader exercise_template
view: wrong variable parameter, inner function has different variables:
Line 162 in 42f1a81
Actually, parameter
is used in the inner function, but it is defined in the outer function. Does Python support closures like that? I think I created this issue because the code crashed in my testing. It is important to also test non-existent files, i.e., when you try to download a template file that does not exist. Either it does not exist on the file system or it is not defined in the exercise config.yaml.
If the file does not exist the following message is shown
On the other hand, https://realpython.com/inner-functions-what-are-they-good-for/#closures-and-factory-functions
@jaguarfi thanks, just to confirm, are you saying that you didn't find any problems in the code? That is fine. I may have messed up something myself in my testing. Let's leave the issue open so that I can take a look someday, but now this is not urgent anymore. Thanks for your effort!