Le 23/10/2011 04:33, Guido van Rossum a écrit :
(And I have to agree with Nick that it's best to just return __name__ in all three cases, rather than trying to be clever and use the qualified name.)
My first reaction was that returning 'module.name' was more helpful and saved more typing than just 'name', but I don’t have any real arguments.
I will update the patch on http://bugs.python.org/issue13224 to change the repr of functions and modules. People concerned about breakage will be able to compile a patched Python to test their code.