On Wed, 12 Jan 2005 16:07:37 -0600, Ian Bicking <[EMAIL PROTECTED]> wrote: > As I think these things through, I'm realizing that registered > adaptators really should be 100% accurate (i.e., no information loss, > complete substitutability), because a registered adapter that seems > pragmatically useful in one place could mess up unrelated code, since > registered adapters have global effects. Perhaps transitivity seems > dangerous because that has the potential to dramatically increase the > global effects of those registered adapters.
To put it quite bluntly: many people never bother to implement the _full_ interface of something if all they need is a half baked implementation. For example, I may get away with a sequence-like object in many situations without slice suport in getitem, or a dict with some of the iteration methods. Call it lazyness, but this is known to happen quite often, and Python is quite forgiving in this respect. Add the global scope of the adapter registry & transitivity to this and things may become much harder to debug... ...but on the other hand, transitivity is a powerful tool in the hands of an expert programmer, and allows to write much shorter & cleaner code. Some balance is needed. -- Carlos Ribeiro Consultoria em Projetos blog: http://rascunhosrotos.blogspot.com blog: http://pythonnotes.blogspot.com mail: [EMAIL PROTECTED] mail: [EMAIL PROTECTED] _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com