[Tutor] Do not understand code snippet from "26.8. test — Regression tests package for Python"

Peter Otten __peter__ at web.de
Mon Apr 17 04:47:21 EDT 2017


Peter Otten wrote:

> class M:
>     def foo_one(self):
>         print(self.__class__.__name__, "one")
>     def foo_two(self):
>         print(self.__class__.__name__, "one")
 
Oops, foo_two() should of course print "two", not "one".



More information about the Tutor mailing list