[Python-3000] New section for PEP 3124 (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jul 25 06:06:04 CEST 2007


Phillip J. Eby wrote:

At 03:16 PM 7/24/2007 -0700, Guido van Rossum wrote:

I'm confused why you spend so much time refuting the argument, The purpose was to capture the arguments on both sides for posterity as part of the PEP.

I don't think you need to spend so many words on the argument itself -- a one-paragraph summary would be enough.

The parts outlining recommended practice for overloading look useful, though. This is the sort of thing I was after with my "What methodology can I follow?" question.

But I would phrase it in an "It is recommended that..." kind of way rather than making assertions about what "can be found" in code (that doesn't exist yet in Python).

For example, epydoc and pydoc contain functions that inspect the type of their arguments in order to decide what to with them. While it's arguable that in a GF world, the authors should have made those functions overloadable, it isn't reasonable to expect everyone to rewrite their code to make everything overloadable, nor to correctly anticipate every function for which extension might be needed.

However, given the existence of GFs, someone writing something like pydoc, and coming to a point where he is about to write an if-else statement that switches on a type, perhaps ought to at least suspect that it might be a good idea to use a GF instead?

-- Greg



More information about the Python-3000 mailing list