"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > #!/usr/bin/python2.4 > > """An example of generic functions vs. adaptation.
Nice. For me, the idea of 'generic function' goes into my brain much more smoothly than the idea of 'protocol adaptation' even though the effect seems to be about the same. That is because I think of Python as a language for writing generic algorithms. Untyped polymorphic expressions, coupled with special methods that plug user types into the syntax of such expressions, are the main means to do so. But when these are inadequate (because different types require different expressions, or because some types benefit from specialized expressions) or difficult (due to builtin-ness or inavailability of code), a more generic means might be a nice addition. One test of whether a specific implementation of the idea should be added is whether it would be used to replace some of the ad hoc special-case methods, as with pickle reduce. Terry Jan Reedy _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com