> It strikes me that one aspect of "being Pythonic" is a strong reliance > on politeness: that's what duck-typing is all about.
Part of my motivation for entering this discussion is that C++ templates use duck-typing, and the C++ community has for several years been thinking about how to add more explicit constraints to the type system. One motivation is easier diagnostics: If by mistake you hand a non-sequence to something that requires a sequence, it would be nice for the compiler to be able to say "This argument does not satisfy the 'sequence' constraint" rather than spewing forth a page of error messages generated deep in the internals of the library. I understand that this exact motivation doesn't apply in Python because of its dynamic typing. However, I've seen examples in Python that feel to me like that address similar problems to the ones in C++. Of course, such feelings don't prove anything; but sometimes they help point the way to a useful solution. _______________________________________________ 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