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
interesting issue: if student writes nothing after def (): within scope of function, then Python throws an error and SCT doesn't work. See screenshot. any cheeky work-around?
The text was updated successfully, but these errors were encountered:
The problem here is that this is a syntax error (IndentationError inherits from SyntaxError), so the code can not be parsed. There's no work around.
This also was a problem in testwhat, and what we did there is start writing a parser that recognises certain typical syntax errors and generates better readable feedback for them. This is wat we plan to do for pythonwhat too at some point.
Very interesting! Worth thinking about in more detail at some point as Intermediate Python II will contain a Chapter on user-defined functions and this will be important there.
filipsch
changed the title
test_function_definition: if Nothing included in function def
test_function_definition: if Nothing included in function def --> Improve syntax error messaging
May 31, 2016
hi!
interesting issue: if student writes nothing after
def ():
within scope of function, then Python throws an error and SCT doesn't work. See screenshot. any cheeky work-around?The text was updated successfully, but these errors were encountered: