At 09:59 AM 12/5/2006 -0600, Guido van Rossum wrote: >My point is that an interface can *document* (at least in English) a >"contract" about the invariants between operations. While I'm not into >enforcing or verifying such contracts, I'm very interested in >documenting them. For example, something that has "mapping" behavior >has a very different relationship between x[y] and "y in x" than >something that has "sequence" behavior.
I assumed this didn't need answering. If you're using the interface solely for documentation, then a namespace-oriented interface suffices to provide it. > If you see interfaces as >*just* combinations of operations there is no way to put this >information. Ah. I've been thinking of this as there being two different 'getitem' operations, like at the C level. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
