On 25.08.2015 18:01, Prof. Dr. L. Humbert wrote:
1st class pedagogical/didactical thinking … Consider: there are recursive defined ADTs and we want to enable students to understand concepts and produce python-code to realize, what they understood.
The main point: if the students already understood, that it is possible to place type hints to place type hints for arguments and results of functions/methods they should be able to reuse the notation in an orthogonal manner.
I am sorry about going back to this but why not teaching this in a different lesson?
When it comes to recursive ADTs they should be able to write class Tree: def __init__(self, left: Tree, right: Tree): self.left = left self.right = right
I still think, only looking at recursive ADTs, it is enough to for them to write class Tree: def __init__(self, left_tree, right_tree): self.left_tree = left_tree self.right_tree = right_tree This way, you can teach them about code style, proper variable names and so forth. Regards, Sven R. Kunze