UCL / rsd-engineeringcourse

Course materials for Research Software Engineering course.
http://github-pages.ucl.ac.uk/rsd-engineeringcourse/
Other
118 stars 101 forks source link

Operator overloading page #117

Closed mattagape closed 5 years ago

mattagape commented 6 years ago
  1. If the idea is to teach operator overloading, I don't know why he does it with such complicated examples.

  2. What does zip() mean in the Term class?

ageorgou commented 6 years ago

I agree this is perhaps needlessly convoluted, especially if we don't need to be building up the class step by step. It would be easier to show the whole class definition and then point out which part allows which functionality.

More generally, however, it might be better to just

Also: "__getitem to apply [1] to your object" -> rephrase for clarity ("__getitem to let you index or access part of your object like a sequence or dictionary, e.g. newObject[1] or newObject["data"]")