[Python-3000] question Re: Need help completing ABC pep

Samuele Pedroni pedronis at openendsystems.com
Sun Apr 22 12:35:47 CEST 2007

Guido van Rossum wrote:
> I don't believe that's always true. I can imagine use cases where, if
> I were writing it in an if-then-else fashion, I'd be writing the
> *same* if-test several times as part of a particular algorithm,
> without having an easy way to refactor the algorithm so that there's
> only one place testing it. Turning each place where the if-test is
> repeated into a different GF might be a wasted of time; turning just
> the test into a GF seems just right. (IN THAT PARTICULAR CASE.)
> Note that I don't object against the idea that usually a GF is better;
> I just don't think it always is so.

If we keep s % d (do we? reading the list archives and the peps didn't 
give an answer, I suppose it depends if PEP 3101
is accepted):

will it check if d is a Mapping or continue to use the current heuristics?

I suppose this is a legitimate question for other corners of the 
language, std lib.

More information about the Python-3000 mailing list