Skip to content
All apps

Operators are methods

About this app

Which method does a * b call? A flow diagram shows the two stations a.__mul__(b) and b.__rmul__(a) with the exits result, NotImplemented and error. With numbers, strings, lists, fractions in four stages (isinstance, __rmul__, __eq__) and runs with and without __lt__: why 3 * Bruch(1, 2) first fails at the int and then ends up in __rmul__.

Subject: Computer science

More from Computer science

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps