30 Sep
2001
30 Sep
'01
6:24 p.m.
If you really typed "b.aa", then something's really strange, because you didn't ask to call anything, yet B's __getattr__ was asked for "__repr__", not "aa". Since I doubt Guido has adopted VB's call-with-no-args-doesn't-need-parens, I bet you misquoted your session.
For Gordon: the repr() call was implied when the value retrieved was about to be printed by the interactive interpreter.
No, I have it right. It was my intention to try b.aa. Every Python object has ability to represent itself as string. That is what I wanted here.
For Roman: *most* objects have this ability, but a bug in a program may cause this to fail. It's not a guarantee. --Guido van Rossum (home page: http://www.python.org/~guido/)